All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
At-Tirmithi cited a Hadeeth with this meaning narrated by Mak-hool on the authority of Waathilah ibn Al-Asqa’ that the Prophet, sallallaahu ‘alayhi wa sallam, said: "Do not rejoice over the misfortune of your brother lest Allaah should be merciful to him (by saving him from that misfortune) and afflicts you with it." [At-Tirmithi said: This is a Hasan Ghareeb Hadeeth, and Mak-hool heard Hadeeth directly from Waathilah ibn Al-Asqa]
Al-Albaani classified it as Dha‘eef (weak) and commented: "His (At-Tirmithi's) statement that Mak-hool heard Hadeeth directly from Waathilah is contrary to the statement of his teacher Al-Bukhari who said the opposite. There is no doubt that Al-Bukhari is more knowledgeable of the defects of Ahaadeeth and of ‘Ilm Ar-Rijaal (i.e. assessment of Hadeeth narrators), especially that Abu Haatim Ar-Raazi asserted the same (i.e. that Mak-hool did not hear Hadeeth directly from Waathilah)."
Even if the Hadeeth is not Saheeh (sound), its meaning is correct and sound. Al-Baghawi said: "It has been reported that ‘Abdullaah ibn Mas‘ood said: 'I fear mocking a dog lest I be turned into one!' Ibraaheem said: 'I would see a defect but would fear criticizing it lest I might end up having the same defect. ‘Abdullaah (ibn Mas‘ood) used to say that affliction is (often) linked to what a person says.'" [Sharh As-Sunnah]
The well-versed scholar Ibn ‘Uthaymeen commented on the Hadeeth of Waathilah saying that the Prophet, sallallaahu ‘alayhi wa sallam, said: "'Do not rejoice over the misfortune of your brother lest Allaah should be merciful to him and afflict you.' It means that if the person insults another for his mishaps, Allaah, The Exalted, may have mercy on that afflicted person, relieve his calamity and afflict the other with the very mishap he was mocking. This is very common. Therefore, another Hadeeth was reported to the same effect, yet its authenticity is questionable; however, its meaning is similar to that one. It reads: 'Whoever insults his brother for a sin, he will not die until he commits the same sin.' Therefore, one should beware of insulting his fellow Muslims; Allaah may relieve them of such defects and afflict him with the same defects." [Sharh Riyaadh As-Saaliheen]
Allaah Knows best.