The Messenger of Allah ﷺ was asked about a slave-woman who commits adultery while not being married. He replied, "If she commits adultery, flog her. Then if she commits adultery again, flog her. Then if she commits adultery again, flog her. Then sell her, even for a rope of hair."Ibn Shihab said, "I do not know whether it was after the third or the fourth offense."
أن رسول الله ﷺ سئل عن الأمة إذا زنت ولم تحصن؟ فقال: إن زنت فاجلدوها، ثم إن زنت فاجلدوها، ثم إن زنت فاجلدوها. ثم بيعوها ولو بضفير قال ابن شهاب: لا أدري أبعد الثالثة أو الرابعة.
Malik narrated it in Hudud (14) from Ibn Shihab, from Ubaydullah bin Abdullah bin Utba bin Masud, from Abu Hurairah and Zayd bin Khalid Juhani, and they both mentioned it. Bukhari narrated it in Hudud (6837-6838) and Muslim in Hudud (32:1703), both of them through Malik, in the same way.Bayhaqi said (8/242), Likewise a group of trustworthy scholars of hadith narrated from Zuhri, stating explicitly that she is to be flogged if she commits zina without being married. So her flogging after her marriage is established by the Quran, and her flogging before her marriage is established by the sunnah, according to the view of those who hold that the protection mentioned in these verses means marriage.Khattabi said, "As for his statement, 'If she commits zina without being married,' people have differed concerning this expression." Some of them said, "It is not reliably preserved, and this hadith has been narrated through another route in which there is no mention of marriage." Others said, "It was simply a question about a slave woman who committed zina and had no husband. So the Prophet said, 'She is to be flogged,' meaning just as married women are flogged, and this was merely incidental to the circumstance of the one being asked about, not a condition upon which the ruling depends, such that it would change based on its presence or absence."Abdullah bin Abbas and a group of the Tabiin held the view that if a slave woman commits zina without being married, no punishment is due upon her, rather she is beaten as a disciplinary measure. Their basis is the contrary implication drawn from the noble verse "But when they are married" [Nisa 4:25], meaning that in the absence of marriage nothing is due upon her.A daif hadith has been reported on this matter, which is what Saeed bin Mansur narrated, from Sufyan, from Masaar, from Amr bin Mura, from Saeed bin Jubayr, from Ibn Abbas, who said, the Messenger of Allah said, "There is no punishment due on a slave woman until she is married, or until she weds, but once she is married to a husband, she incurs half of what is due on married women." Ibn Khuzayma narrated it and said, Raising it to the level of the Prophet's own words is a mistake, it is only a statement of Ibn Abbas. Ibn Kathir mentioned this. I say, this is as he said. Bayhaqi narrated it (8/243) through another route from Mujahid and Ikrima, from Ibn Abbas, as his own statement.Most jurists said that she is to be flogged even if she has not married, and according to them the meaning of protection is being Muslim. Aasim, Amash, Hamza, and Kisai read it as "ahsana," with the alif in fatha, meaning "they became Muslim."