Jabir bin Abdullah reported,

I heard the Messenger of Allah ﷺ say, "I am only a human being, and I have stipulated with my Lord عز وجل that whichever Muslim servant I curse or revile, let that be a means of purification and reward for him."

Azami 9639

Sahih

عن جابر بن عبد الله يقول

سمعت رسول الله ﷺ يقول: إنما أنا بشر، وإني اشترطت على ربي عز وجل، أي عبد من المسلمين سببته أو شتمته أن يكون ذلك له زكاة وأجرا.

الأعظمي 9639صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Characteristics of the Prophet ﷺ
Section
One whom the Prophet ﷺ cursed or reviled while he was not deserving of that, it would be purification, reward, and mercy for him
Numbering
Jami al-Kamil 9639 (2nd edition)
Azami 9639