Sahih al-Bukhari, Book 37, Hadith 23 (Bukhari 2198)

Narrated Abu Huraira:

The Prophet (ﷺ) prohibited the earnings of slave girls (through prostitution).