We were with the Prophet ﷺ when a man asked him about a slave woman who commits fornication before being married.He said, "Flog her. Then if she fornicates again, flog her."Then on the third or fourth offense, he said, "Sell her, even for a rope of hair."
حدثنا أبو بكر بن أبي شيبة ومحمد بن الصباح قالا حدثنا سفيان بن عيينة عن الزهري عن عبيد الله بن عبد الله
كنا عند النبي ﷺ فسأله رجل عن الأمة تزني قبل أن تحصن فقال اجلدها فإن زنت فاجلدها ثم قال في الثالثة أو في الرابعة فبعها ولو بحبل من شعر
Bukhari narrated it in the Book of Manumission, chapter on the disapproval of overbearing conduct toward slaves and saying "my slave" or "my slave girl", hadith no. 2555, from the narration of Ibn Uyayna in an abridged form. Muslim narrated it in the Book of Legal Punishments, chapter on stoning the Jews among the people of the covenant for fornication, hadith no. 1704, from the narration of Zuhri through this same chain, and the statement of Ibn Uyayna and Shibl was a mistake, as Nasai and others have verified. Refer to Tahdheeb and other works.