The Messenger of Allah ﷺ said, "Whomever 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 of transmission is hasan] Abu Dawud narrated it in the Book of Hudud, Chapter on Whoever Commits the Act of the People of Lot, no. 4462, from the hadith of Abdul-Aziz Darawardi, with this wording. Diya graded it sahih, as did Ibn Jarud, no. 820, along with Hakim (4/355) and Dhahabi.