كتاب المساقاة
22  
The Book of Musaqah
(5)
Chapter: If a man finds what he sold with the purchaser, who has become bankrupt, then he has the right to take it back
(5)
باب مَنْ أَدْرَكَ مَا بَاعَهُ عِنْدَ الْمُشْتَرِي وَقَدْ أَفْلَسَ فَلَهُ الرُّجُوعُ فِيهِ ‏‏
Sahih Muslim 1559 d

Abu Huraira (Allah be pleased with him) reported Allah's Apostle (ﷺ) as saying:

When a man becomes insolvent (and the other) man (the seller) finds his commodity intact with him, he is more entitled to get it (than anyone else)
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، وَعَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، قَالاَ حَدَّثَنَا شُعْبَةُ، عَنْ قَتَادَةَ، عَنِ النَّضْرِ بْنِ أَنَسٍ، عَنْ بَشِيرِ بْنِ نَهِيكٍ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا أَفْلَسَ الرَّجُلُ فَوَجَدَ الرَّجُلُ مَتَاعَهُ بِعَيْنِهِ فَهُوَ أَحَقُّ بِهِ ‏"‏ ‏.‏
Reference : Sahih Muslim 1559d
In-book reference : Book 22, Hadith 29
USC-MSA web (English) reference : Book 10, Hadith 3785
  (deprecated numbering scheme)