Abu Huraira (Allah be pleased with him) reported Allah's Apostle ﷺ saying about a person who becomes insolvent and (the thing bought by him) is found intact with him, that belongs to one who sold it.
عَنِ النَّبِيِّ ﷺ فِي الرَّجُلِ الَّذِي يُعْدِمُ إِذَا وُجِدَ عِنْدَهُ الْمَتَاعُ وَلَمْ يُفَرِّقْهُ أَنَّهُ لِصَاحِبِهِ الَّذِي بَاعَهُ