Sahih al-Bukhari Book 86, Hadith 40
I said, "O Allah's Messenger (ﷺ)! Which is the biggest sin?" He said, "To set up rivals to Allah by
worshipping others though He alone has created you." I asked, "What is next?" He said, "To kill your
child lest it should share your food." I asked, "What is next?" He said, "To commit illegal sexual
intercourse with the wife of your neighbor."
The Prophet (ﷺ) said, "The one who commits an illegal sexual intercourse is not a believer at the time of committing illegal sexual intercourse and a thief is not a believer at the time of committing theft and a drinker of alcoholic drink is not a believer at the time of drinking. Yet, (the gate of) repentance is open thereafter."
from `Ali when the latter stoned a lady to death on a Friday. `Ali said, "I have stoned her according to the tradition of Allah's Messenger (ﷺ)."