Hadithcore
Sahih Muslim, 2756 c
sahih

Abu Huraira reported Allah's Messenger (ﷺ) as saying that a servant transgressed the litnit in committing sins. The rest of the hadith is the same but there is no mention of the story of the cat in it and in the hadith transmitted on the authority of Ziibaidl (the words are):

" Allah, the Exalted and Glorious, said to everything which had taken a part of lies ashes to return what it had taken."

حَدَّثَنِي أَبُو الرَّبِيعِ، سُلَيْمَانُ بْنُ دَاوُدَ حَدَّثَنَا مُحَمَّدُ بْنُ حَرْبٍ، حَدَّثَنِي الزُّبَيْدِيُّ، قَالَ الزُّهْرِيُّ حَدَّثَنِي حُمَيْدُ بْنُ عَبْدِ الرَّحْمَنِ بْنِ عَوْفٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏"‏ أَسْرَفَ عَبْدٌ عَلَى نَفْسِهِ ‏"‏ ‏.‏ بِنَحْوِ حَدِيثِ مَعْمَرٍ إِلَى قَوْلِهِ ‏"‏ فَغَفَرَ اللَّهُ لَهُ ‏"‏ ‏.‏ وَلَمْ يَذْكُرْ حَدِيثَ الْمَرْأَةِ فِي قِصَّةِ الْهِرَّةِ وَفِي حَدِيثِ الزُّبَيْدِيِّ قَالَ ‏"‏ فَقَالَ اللَّهُ عَزَّ وَجَلَّ لِكُلِّ شَىْءٍ أَخَذَ مِنْهُ شَيْئًا أَدِّ مَا أَخَذْتَ مِنْهُ ‏"‏ ‏.‏

References2 variants
In-Book Reference
Book 50, Hadith 30
USC-MSA web (English) reference
Book 37, Hadith 6639 (deprecated numbering scheme)