Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:24:19

Indeed, those who like that immorality should be spread ˹or publicized˺ among those who have believed will have a painful punishment in this world and the Hereafter. And Allah knows and you do not know.  

Truly those who love that indecency should be spread, by the tongue, concerning those who believe, by its being associated with them — and the ones ˹meant˺ are the band — theirs will be a painful chastisement in the life of this world, by way of the prescribed ˹legal˺ punishment for ˹false˺ accusation, and the Hereafter, by way of the Fire, as is God’s due, and God knows, that such ˹indecency˺ does not apply in their case, and you, O band ˹of accusers˺, as regards the calumny of which you spoke, do not know, whether such ˹indecency˺ took place among them.
القرآن:٢٤:١٩

إِنَّ الَّذِينَ يُحِبُّونَ أَنْ تَشِيعَ الْفَاحِشَةُ فِي الَّذِينَ آمَنُوا لَهُمْ عَذَابٌ أَلِيمٌ فِي الدُّنْيَا وَالْآخِرَةِ ۚ وَاللَّهُ يَعْلَمُ وَأَنْتُمْ لَا تَعْلَمُونَ  

{إن الذين يحبون أن تشيع الفاحشة} باللسان {في الذين آمنوا} بنسبتها إليهم وهم العصبة {لهم عذاب أليم في الدنيا} بحد القذف {والآخرة} بالنار لحق الله {والله يعلم} انتفاءها عنهم {وأنتم} أيها العصبة بما قلتم من الإفك {لا تعلمون} وجودها فيهم.

See similar narrations below:

Collected by Ṭabarānī
tabarani:19610Aḥmad b. Muḥammad b. Yaḥyá b. Ḥamzah > Abū al-Jumāhir > Saʿīd b. Bashīr

[Machine] About Qatadah in his saying "Indeed, those who love for immorality to be spread among the believers, for them is a painful punishment" meaning "adultery".  

الطبراني:١٩٦١٠حَدَّثَنَا أَحْمَدُ بْنُ مُحَمَّدِ بْنِ يَحْيَى بْنِ حَمْزَةَ ثنا أَبُو الْجُمَاهِرِ ثنا سَعِيدُ بْنُ بَشِيرٍ

عَنْ قَتَادَةَ فِي قَوْلِهِ {إِنَّ الَّذِينَ يُحِبُّونَ أَنْ تَشِيعَ الْفَاحِشَةُ فِي الَّذِينَ آمَنُوا لَهُمْ عَذَابٌ أَلِيمٌ} «أَيِ الزِّنَا»