Sahih al-Bukhari 3321
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
غُفِرَ لاِمْرَأَةٍ مُومِسَةٍ مَرَّتْ بِكَلْبٍ عَلَى رَأْسِ رَكِيٍّ يَلْهَثُ، قَالَ كَادَ يَقْتُلُهُ الْعَطَشُ، فَنَزَعَتْ خُفَّهَا، فَأَوْثَقَتْهُ بِخِمَارِهَا، فَنَزَعَتْ لَهُ مِنَ الْمَاءِ، فَغُفِرَ لَهَا بِذَلِكَ "
Narrated Abu Huraira:
Allah's Messenger (ﷺ) said, "A prostitute was forgiven by Allah, because, passing by a panting dog near a well and seeing that the dog was about to die of thirst, she took off her shoe, and tying it with her head-cover she drew out some water for it. So, Allah forgave her because of that."
Full reference and source
Sahih al-Bukhari 3321 In-book : Book 59, Hadith 127 USC-MSA web (English) : Vol. 4, Book 54, Hadith 538 (deprecated)
View source on Sunnah.com (opens in a new tab)