This hadith has been transmitted on the authority of 'Amir b. Sa'd and the words are. Allah's Messenger (ﷺ) said:
The greatest sinner of the Muslims amongst Muslims is one who asked about a certain thing which had not been prohibited and it was prohibited because of his asking about it.
Reference: Sahih Muslim 2358 b In-book : Book 43, Hadith 175 USC-MSA web (English) : Book 30, Hadith 5822 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.