The Messenger of Allah ﷺ said, "If a man sells goods and the one who bought them from him goes bankrupt, and the seller has received nothing of the price, then if he finds his goods still intact he has the better right to them. But if the buyer has died, then the owner of the goods stands on equal footing with the other creditors."
حدثني يحيى عن مالك عن ابن شهاب
أن رسول الله ﷺ قال أيما رجل باع متاعا فأفلس الذي ابتاعه منه ولم يقبض الذي باعه من ثمنه شيئا فوجده بعينه فهو أحق به وإن مات الذي ابتاعه فصاحب المتاع فيه أسوة الغرماء