The Messenger of Allah ﷺ said, "Whoever is asked about knowledge and conceals it, Allah will bridle him with a bridle of fire."
حدثنا حسن حدثنا حماد بن سلمة عن علي بن الحكم عن عطاء بن أبي رباح
أن رسول الله ﷺ قال من سئل عن علم فكتمه ألجمه الله عز وجل بلجام من نار
Abu Dawud, Tirmidhi, Nasai, Ibn Majah, and Hakim narrated it from Abu Hurairah, and Suyuti indicated its soundness in Jami Saghir. Hakim and Ibn Hibban graded it sahih from the hadith of Abu Hurairah, and Tirmidhi said it is hasan sahih. He narrated it with the wording, "Whoever conceals knowledge that he knows will be bridled on the Day of Resurrection with a bridle of fire."