Allah the Exalted said:
٢٧٤ - باب النهي عن إظهار الشماتة بالمسلم
Allah the Exalted said:
The believers are but brothers, so make settlement between your brothers. And fear Allāh that you may receive mercy.
And the Exalted said:
Indeed, those who like that immorality1 should be spread [or publicized] among those who have believed will have a painful punishment in this world and the Hereafter. And Allāh knows2 and you do not know.
Wāthila ibn al-Asqaʿ (may Allah be pleased with him) said: The Messenger of Allah ﷺ said: "Do not show gloating at your brother's misfortune, lest Allah show him mercy and afflict you." Narrated by al-Tirmidhī, who said: "A good (ḥasan) hadith." Belonging to this chapter is the earlier hadith of Abū Hurayra in the chapter on spying: "Every Muslim is sacrosanct to another Muslim..." — the hadith.