The Prophet (ﷺ) said: If anyone buys a slave who possesses property, his property belongs to the seller unless the buyer makes a proviso.
Sunan Abi Dawud Book 24, Hadith 20