The Messenger of Allah ﷺ said, "Whoever you find committing the act of the people of Lut, kill both the one who does it and the one to whom it is done."
حدثنا محمد بن عمرو السواق حدثنا عبد العزيز بن محمد عن عمرو بن أبي عمرو عن عكرمة
قال رسول الله ﷺ من وجدتموه يعمل عمل قوم لوط فاقتلوا الفاعل والمفعول به
[Its chain is hasan]. Abu Dawud also narrated it in the Book of Legal Punishments, chapter on one who does the act of the people of Lut, no. 4462, as did Ibn Majah, no. 2561, from the hadith of Abdul-Aziz Darawardi, through him. Ibn Jarud declared it sahih, no. 820, as did al-Hakim (4/355) and Dhahabi and others.There is also a narration on this subject from Jabir [coming up at no. 1457] and Abu Hurairah [Ibn Majah, no. 2562].