Bulugh al-Maram 1228
وَعَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا; أَنَّ النَّبِيَّ - صلى الله عليه وسلم - قَالَ: «مَنْ وَجَدْتُمُوهُ يَعْمَلُ عَمَلَ قَوْمِ لُوطٍ, فَاقْتُلُوا الْفَاعِلَ وَالْمَفْعُولَ بِهِ, وَمَنْ وَجَدْتُمُوهُ وَقَعَ عَلَى بَهِيمَةٍ, فَاقْتُلُوهُ وَاقْتُلُوا الْبَهِيمَةَ». رَوَاهُ أَحْمَدُ وَالْأَرْبَعَةُ, وَرِجَالُهُ مُوَثَّقُونَ, إِلَّا أَنَّ فِيهِ اِخْتِلَافًا.
From Ibn ʿAbbas, may Allah be pleased with them both, that the Prophet ﷺ said: "Whoever you find doing the act of the people of Lut, kill the one who does it and the one to whom it is done. And whoever you find having intercourse with an animal, kill him and kill the animal." Ahmad and the Four reported it, and its narrators are deemed trustworthy, except that there is disagreement about it.