I heard the Prophet ﷺ say, "No Muslim man, Muslim woman, believing man, or believing woman is afflicted by illness without Allah removing some of their sins because of it."
حدثنا علي بن بحر حدثنا عيسى حدثنا الأعمش عن أبي سفيان
سمعت النبي ﷺ يقول ما من مسلم ولا مسلمة ولا مؤمن ولا مؤمنة يصيبه مرض إلا حط الله عنه من خطاياه