Question: What is the ruling on one who insults and curses ʿAlī ibn Abī Ṭālib (Peace be upon him), or al-Zahrāʾ, or al-Ḥasan, or al-Ḥusayn (Peace be upon them)?
Answer – and Allah is the One who grants success: Whoever insults a believer or a Muslim on account of his being a believer, or on account of his being a Muslim – his ruling is disbelief. Likewise, whoever shows enmity to either of them on account of faith or Islam; and likewise whoever insults the scholars of religion because they are scholars of religion – the ruling for all such people is disbelief, and the rulings of disbelief apply to them.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2