I visited the Messenger of Allah ﷺ while he was suffering from a fever, and I said, "Messenger of Allah, you are burning with a severe fever."He replied, "Yes, indeed I suffer a fever equal to that of two men among you."I asked, "Is that because you receive a double reward?"He answered, "Yes, that is so. No Muslim is afflicted with any harm, even a thorn or something smaller, without Allah wiping away his sins by it, just as a tree sheds its leaves."
دخلت على رسول الله ﷺ وهو يوعك، فقلت: يا رسول الله! إنك توعك وعكا شديدا؟ قال: أجل! إني أوعك كما يوعك رجلان منكم. فقلت: ذلك أن لك أجرين؟ قال: أجل! ذلك كذلك، ما من مسلم يصيبه أذى، شوكة فما فوقها إلا كفر الله بها سيئاته كما تحط الشجر ورقها.
Bukhari narrated it in "The Sick" (5647) and Muslim in "Righteousness and Kinship Ties" (2571), both from the hadith of Sufyan, from Amash, from Ibrahim Taymi, from Harith bin Suwayd, from Abdullah, who related it.