Saad bin Abu Waqqas reported,

The Prophet ﷺ said, "The Muslim who commits the gravest offense is one who asks about something that was not forbidden, and it becomes forbidden because of his question."

Azami 11912

Sahih

عن سعد بن أبي وقاص

أن النبي ﷺ قال: إن أعظم المسلمين جرما من سأل عن شيء لم يحرم، فحرم من أجل مسألته.

الأعظمي 11912صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "Or do you intend to ask your Messenger as Musa was asked before? And whoever exchanges faith for disbelief has certainly strayed from the soundness of the way"
Numbering
Jami al-Kamil 11912 (2nd edition)
Azami 11912