It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Whomever you find committing bestiality with an animal, kill him and kill the animal along with him; and whomever you find doing the deed of the people of Lut (sodomy), kill both the one who does it and the one to whom it is done."
Hadith Referenceمسند أبي يعلى الموصلي / أول مسند ابن عباس / 2743
Hadith Takhrij«قال سعيد بن محمد السناري: ضعيف: مضى الكلام عليه [برقم 2462، 2463]» «أخرجه سنن الترمذي برقم: 1456، وأخرجه سنن أبي داود برقم: 4462، وأخرجه سنن ابن ماجه برقم: 2561، وأخرجه مسند أحمد برقم: 2727، وأخرجه شرح مشكل الآثار برقم: 3834، مسند ابویعلیٰ ترقیم الاثری: 2735»