Volume 9 · Book 92 · Hadith 392
Narrated Sa'd bin Abi Waqqas: The Prophet said, "The most sinful person among the Muslims is the one who asked about something which had not been prohibited, but was prohibited because of his asking."
— Sahih Bukhari, Volume 9, Book 92: Holding Fast to the Qur'an and Sunnah, Hadith #392