I heard the Messenger of Allah ﷺ say, "The illness that afflicts a believer is an expiation for his sins."
سمعت رسول الله ﷺ يقول: وصب المؤمن كفارة لخطاياه.
No references are available.
Reported by Hakim (1/347) and Ibn Abu Dunya in Al-Marad (58, 131), both by way of Ubaydullah bin Musa, who reported, Israil informed us, from Abdullah bin Mukhtar, from Ibn Sirin, from Abu Hurairah, and he mentioned it. Hakim said, "Sahih." As for Abdullah bin Mukhtar, although Hafiz said of him, "There is no harm in him," the correct view is that he is trustworthy, for a group of scholars affirmed his reliability, among them Ibn Main, Nasai, and others, and he is among the men of Muslim. As for the rest of the narrators, they are trustworthy men found in Sahih.