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."
سمعت رسول الله ﷺ يقول: إنما أنا بشر، وإني اشترطت على ربي عز وجل، أي عبد من المسلمين سببته أو شتمته أن يكون ذلك له زكاة وأجرا.
Muslim narrated it in the Book of Righteousness and Maintaining Ties (2602/94) through several routes from Ibn Jurayj, who said, Abu Zubayr told me that he heard Jabir bin Abdullah, and he mentioned it. He also narrated it (2602) through the route of Amash, from Abu Sufyan, from Jabir, in a similar manner.