Sure An-Nisaa

4:15

وَٱلَّٰتِى يَأْتِينَ ٱلْفَٰحِشَةَ مِن نِّسَآئِكُمْ فَٱسْتَشْهِدُوا۟ عَلَيْهِنَّ أَرْبَعَةًۭ مِّنكُمْ ۖ فَإِن شَهِدُوا۟ فَأَمْسِكُوهُنَّ فِى ٱلْبُيُوتِ حَتَّىٰ يَتَوَفَّىٰهُنَّ ٱلْمَوْتُ أَوْ يَجْعَلَ ٱللَّهُ لَهُنَّ سَبِيلًۭا

Und diejenigen von euren Frauen, die das Abscheuliche begehen, - bringt vier Zeugen von euch gegen sie. Wenn sie (es) bezeugen, dann haltet sie im Haus fest, bis der Tod sie abberuft oder Allah ihnen einen (Aus)weg schafft.

Tafsir 4:15

For those of your women who commit sexual offences – whether they are married or unmarried – call four trustworthy Muslim men witnesses. If they bear witness against them, then confine them to their homes as a punishment, until the end of their lives, or until Allah makes a way for them other than being confined. The ruling of this verse was replaced with the ruling that unmarried women who have illicit sexual relations should be whipped a hundred times and banished for a year, and married women who have illicit sexual relations should be stoned.