Whilst this is a deeply controversial and divisive subject, matter if we are going to ascertain the origins from where this practice commenced, we will see it originates from the blessed tongue of Rasulullah (s).
We read in Sahih Muslim Chapter 25 has a Book كتاب البر والصلة والآداب
(The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship) Chapter: 45 سَبَّهُ أَوْ دَعَا عَلَيْهِ (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)
Now, who was Rasulullah (s) cursing and reviling? Those who he came into contact with. Who were these people? They were the Sahaba. It is for that reason that the below tradition was conveniently concocted to forgive the people that were cursed! Had they been the enemies of Islam there would have no grounds for such a caveat, but as certain individuals were victims of this curse that the Ahl’ul Sunnah revere, a need emerged for this curse to turned into a positive, hence the chapter heading turning a curse into a blessing for those cursed without reason. Let us now look at the first narration:
Sahih Muslim, Book 45 Hadith number 112
حَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا جَرِيرٌ، عَنِ الأَعْمَشِ، عَنْ أَبِي الضُّحَى، عَنْ مَسْرُوقٍ، عَنْ عَائِشَةَ، قَالَتْ دَخَلَ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم رَجُلاَنِ فَكَلَّمَاهُ بِشَىْءٍ لاَ أَدْرِي مَا هُوَ فَأَغْضَبَاهُ فَلَعَنَهُمَا وَسَبَّهُمَا فَلَمَّا خَرَجَا قُلْتُ يَا رَسُولَ اللَّهِ مَنْ أَصَابَ مِنَ الْخَيْرِ شَيْئًا مَا أَصَابَهُ هَذَانِ قَالَ " وَمَا ذَاكِ " . قَالَتْ قُلْتُ لَعَنْتَهُمَا وَسَبَبْتَهُمَا قَالَ " أَوَمَا عَلِمْتِ مَا شَارَطْتُ عَلَيْهِ رَبِّي قُلْتُ اللَّهُمَّ إِنَّمَا أَنَا بَشَرٌ فَأَىُّ الْمُسْلِمِينَ لَعَنْتُهُ أَوْ سَبَبْتُهُ فَاجْعَلْهُ لَهُ زَكَاةً وَأَجْرًا " .
A'isha reported that two persons visited Allah's Messenger (ﷺ) and both of them talked about a thing, of which I am not aware, but that annoyed him and he invoked curse upon both of them and hurled malediction, and when they went out I said:
Allah's Messenger, the good would reach everyone but it would not reach these two. He said: Why so? I said: Because you have invoked curse and hurled malediction upon both of them. He said: Don't you know that I have made condition with my Lord saying thus: O Allah, I am a human being and that for a Muslim upon whom I invoke curse or hurl malediction make it a source of purity and reward.
The suggestion that Rasulullah (s) suffered from a condition whereby he'd curse others without basis is an insult, you wouldn't expect such irrational behaviour from any ordinary decent man let alone the seal of all Prophets. It contradicts the Qur'an wherein Allah (swt) declares in Surah Qalam verse 4:
٤ وَإِنَّكَ لَعَلَىٰ خُلُقٍ عَظِيمٍ
And you are of a great moral character
Moreover cursing any Muslim as kufr as per this hadith in Sahih Muslim Book 1 Hadith number 127:
حَدَّثَنَا مُحَمَّدُ بْنُ بَكَّارِ بْنِ الرَّيَّانِ، وَعَوْنُ بْنُ سَلاَّمٍ، قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ طَلْحَةَ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، حَدَّثَنَا سُفْيَانُ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، كُلُّهُمْ عَنْ زُبَيْدٍ، عَنْ أَبِي وَائِلٍ، عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " سِبَابُ الْمُسْلِمِ فُسُوقٌ وَقِتَالُهُ كُفْرٌ "
“It is narrated on the authority of 'Abdullah b. Mas'ud that the Messenger of Allah (may peace and blessings be upon him) observed:
Abusing a Muslim is an outrage and fighting against him is unbelief”
Clearly there had been some attempt to downplay, water down those scenarios wherein Rasulullah (s) cursed individuals, what better way than to produce a narration that turns the curse of Rasulullah (s) into a blessing! When we delve into who benefits from such an illogical narration, it soon dawns on us who the compiler of Sahih Muslim was seeking to protect, so that the curse the recipient received should be a positive. Let us see the recipient that Imam Muslim sought to protect as Rasulullah (s) cursed him
باب مَنْ لَعَنَهُ النَّبِيُّ صلى الله عليه وسلم أَوْ سَبَّهُ أَوْ دَعَا عَلَيْهِ
Ibn Abbas reported:
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى الْعَنَزِيُّ، ح وَحَدَّثَنَا ابْنُ بَشَّارٍ، - وَاللَّفْظُ لاِبْنِ الْمُثَنَّى - قَالاَ حَدَّثَنَا أُمَيَّةُ بْنُ خَالِدٍ، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي حَمْزَةَ الْقَصَّابِ، عَنِ ابْنِ عَبَّاسٍ، قَالَ كُنْتُ أَلْعَبُ مَعَ الصِّبْيَانِ فَجَاءَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَتَوَارَيْتُ خَلْفَ بَابٍ - قَالَ - فَجَاءَ فَحَطَأَنِي حَطْأَةً وَقَالَ " اذْهَبْ وَادْعُ لِي مُعَاوِيَةَ " . قَالَ فَجِئْتُ فَقُلْتُ هُوَ يَأْكُلُ - قَالَ - ثُمَّ قَالَ لِيَ " اذْهَبْ وَادْعُ لِي مُعَاوِيَةَ " . قَالَ فَجِئْتُ فَقُلْتُ هُوَ يَأْكُلُ فَقَالَ " لاَ أَشْبَعَ اللَّهُ بَطْنَهُ " . قَالَ ابْنُ الْمُثَنَّى قُلْتُ لأُمَيَّةَ مَا حَطَأَنِي قَالَ قَفَدَنِي قَفْدَةً .
I was playing with children that Allah's Messenger (ﷺ) happened to pass by (us). I hid myself behind the door. He (the Prophet) came and patted my shoulders and said: Go and call Mu'awiya. I returned and said: He is busy in taking food. He again asked me to go and call Mu'awiya to him. I went (and came back) and said that he was busy in taking food, whereupon he said: May Allah not fill his belly! Ibn Muthanna, said: I asked Umm Umayya what he meant by the word Hatani. He said: It means "he patted my shoulders."
(Source: Sahih Muslim Book 45, Hadith 125 (English) reference : Book 32, Hadith 6298)
Whilst we are aware of the risible efforts by the advocates of Muawiyah to suggest this was not a curse rather it was extolled the riches that Muawiyah would amass later, the fact that it appears in a chapter that refers to those that wherein Prophet (s) cursed, reviled or prayed against people is sufficient. Moreover, when Imam Nasai recited this Hadith to the Nawasib of Syria, it attracted their ire, they assaulted him so severely that he succumbed to his injuries. If our opponents have issue that the Shia curse certain people they deem Sahaba then it should be pointed out that as per Sahih Muslim, this was the Sunnah of Rasulullah (s), as such if the Shi’a curse those that Rasulullah (s) cursed then they are adhering to the Sunnah in this respect