Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Whoever sells a slave who has wealth, the wealth belongs to him (the seller) and the slave's debt is also his responsibility, unless the buyer stipulates it as a condition; and whoever pollinates date palms and then sells them after pollination, the fruit is his, unless the buyer stipulates it as a condition." If this hadith is sound, then what is meant by the slave is a slave who has been permitted to trade; his master will take his wealth and will also pay off the debt.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 11004
Hadith Gradingمحدثین:مسند احمد 3/309
Hadith Takhrij«مسند احمد 3/309 ۔ سنن نسائي حديث 4964»
Abdur Rahman bin Abi al-Zinad (may Allah have mercy on him) narrates from his father that the jurists of the Successors in Madinah used to say: The debt of a slave is his own liability; and whatever he takes of people's wealth other than debt, for example if he snatches something from someone, or seizes property by force, or slaughters someone's camel, all of that is like a wound that he inflicts: either his master pays compensation for it or he hands over his slave.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 11005