Malik related to me from Ibn Shihab from Ubaydullah ibn Abdullah ibn Utba ibn Masud from Abu Hurayra and Zayd ibn Khalid al-Juhani that the Messenger of Allah ﷺ was asked about a slave-girl who committed fornication and was not muhsana. He said, "If she commits fornication, then flog her. If she commits fornication again, then flog her, and if she commits fornication again, then sell her, if only for a rope." Ibn Shihab added, "I don't know whether it was three or four times."
أَنَّ رَسُولَ اللَّهِ ﷺ سُئِلَ عَنِ الأَمَةِ إِذَا زَنَتْ وَلَمْ تُحْصِنْ فَقَالَ إِنْ زَنَتْ فَاجْلِدُوهَا ثُمَّ إِنْ زَنَتْ فَاجْلِدُوهَا ثُمَّ إِنْ زَنَتْ فَاجْلِدُوهَا ثُمَّ بِيعُوهَا وَلَوْ بِضَفِيرٍ قَالَ ابْنُ شِهَابٍ لاَ أَدْرِي أَبَعْدَ الثَّالِثَةِ أَوِ الرَّابِعَةِ