Sayyiduna Abu Musa al-Ash'ari (may Allah be pleased with him) reports this saying of the Prophet (peace and blessings be upon him): "If you are able not to curse anyone, then do so. For when a curse leaves the one who utters it, if the one cursed deserves it, it reaches him; and if he does not deserve it, then the one who cursed deserves it, and it returns to him; and if he too does not deserve it, it reaches a Jew, a Christian or a Magian. So if you are able, never curse anything."
Al-Tabarani recorded it. Its chain contains Ali bin al-Ja'd, whom Ibn Hibban declared thiqah (trustworthy); Yahya bin Ma'in said: "He fabricates hadith," and others declared him a liar. Its chain also contains a narrator whom I do not know.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأدب / 13020