Sahih Muslim
1703.01

Abu Huraira reported that he heard Allah's Messenger (ﷺ) as saying:When the slave-woman of any of you commits adultery and this (offence of hers) becomes clear, she should be flogged (as the prescribed) punishment, but hurl no reproach at her. If she commits adultery again, she should (again be punished) by flogging, but hurl no reproach upon her. If she commits fornication for the third time and it becomes clear, then he should sell her, even if only for a rope of hair

1703.02

This hadith his been narrated on the authority of Abu Huraira through another chain of transmitters with a slight variation of words

1703.03

Abu Huraira reported that Allah's Messenger (ﷺ) was asked about the slave-woman who committed adultery and was not protected (married). He said:If she commits adultery, then flog her and if she commits adultery again, then flog her and then sell her even for a rope. Ibn Shihab said: I do not know whether he said this (his statement pertaining to the sale of slave-woman) at the third or the fourth time. Ibn Shihab said that the word dafir (used in the text) means rope