Muwatta Malik, Book 50, Hadith 1719 (In-Book)

Yahya related to me from Malik from Yazid ibn Khusayfa that Urwa ibn az-Zubayr said that he heard A'isha, the wife of the Prophet, may Allah bless him and grant him peace, say, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'When a mumin is afflicted by something, even a thorn, it removes (or effaces) his wrong actions.' " Yazid did not know which of them Urwa said.

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

sunnah.com

also referenced under: Book 50, Hadith 6 (USC-MSA)