Abu Hurairah reported,

I heard the Messenger of Allah ﷺ say, "A servant transgressed against himself," in a manner similar to the hadith of Muamar up to his words, "so Allah forgave him." He did not mention the hadith of the woman in the story of the cat. In the hadith of Zubaydi, he said, "Allah عز وجل said to everything from which something had been taken, 'Restore what you took from him.'"

Muslim 6983

Sahih

حدثني أبو الربيع سليمان بن داود حدثنا محمد بن حرب حدثني الزبيدي قال الزهري حدثني حميد بن عبد الرحمن بن عوف

عن أبي هريرة قال

سمعت رسول الله ﷺ يقول أسرف عبد على نفسه بنحو حديث معمر إلى قوله فغفر الله له ولم يذكر حديث المرأة في قصة الهرة وفي حديث الزبيدي قال فقال الله عز وجل لكل شيء أخذ منه شيئا أد ما أخذت منه

مسلم 6983صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Tawba
Chapter
Vastness of Allah's mercy and that it precedes His wrath
Numbering
Darussalam 6983
Muslim 6983