The Messenger of Allah ﷺ said, "Whoever is asked about knowledge and conceals it, Allah will bridle him with a bridle of fire on the Day of Resurrection."
حدثنا موسى بن إسمعيل حدثنا حماد أخبرنا علي بن الحكم عن عطاء
قال رسول الله ﷺ من سئل عن علم فكتمه ألجمه الله بلجام من نار يوم القيامة
[Its chain is hasan] Tirmidhi recorded it in the Book of Knowledge, chapter on what has been said about concealing knowledge, no. 2649, through the hadith of Ali bin Hakam, with this wording, and he said, hasan, and Ibn Hibban graded it sahih, no. 95. A group of narrators also related it from Ata bin Abu Rabah, with this wording.