كتاب البر والصلة والآداب
45  
The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship
(25)
Chapter: Whomever Is Cursed, Reviled Or Prayed Against By The Prophet (SAW) When He Does Not Deserve That, It Will Be Purification, Reward And Mercy For Him
(25)
باب مَنْ لَعَنَهُ النَّبِيُّ صلى الله عليه وسلم أَوْ سَبَّهُ أَوْ دَعَا عَلَيْهِ
Sahih Muslim 2601 e

Salim, the freed slave of Nasriyyin, said:

I heard Abu Huraira as saying that he heard Allah's Messenger (ﷺ) as saying: O Allah, Muhammad is a human being. I lose my temper just as human beings lose temper, and I have held a covenant with Thee which Thou wouldst not break: For a believer whom I give any trouble or invoke curse or beat, make that an expiation (of his sins and a source of) his nearness to Thee on the Day of Resurrection.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا لَيْثٌ، عَنْ سَعِيدِ بْنِ أَبِي سَعِيدٍ، عَنْ سَالِمٍ، مَوْلَى النَّصْرِيِّينَ قَالَ سَمِعْتُ أَبَا هُرَيْرَةَ، يَقُولُ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ اللَّهُمَّ إِنَّمَا مُحَمَّدٌ بَشَرٌ يَغْضَبُ كَمَا يَغْضَبُ الْبَشَرُ وَإِنِّي قَدِ اتَّخَذْتُ عِنْدَكَ عَهْدًا لَنْ تُخْلِفَنِيهِ فَأَيُّمَا مُؤْمِنٍ آذَيْتُهُ أَوْ سَبَبْتُهُ أَوْ جَلَدْتُهُ فَاجْعَلْهَا لَهُ كَفَّارَةً وَقُرْبَةً تُقَرِّبُهُ بِهَا إِلَيْكَ يَوْمَ الْقِيَامَةِ ‏"‏ ‏.‏
Reference : Sahih Muslim 2601e
In-book reference : Book 45, Hadith 120
USC-MSA web (English) reference : Book 32, Hadith 6293
  (deprecated numbering scheme)