Abu Darda reported: The Messenger of Allah, peace and blessings be upon him, said, “Verily, when a servant curses something, the curse rises to the heaven and the gates of heaven close upon it. It turns right and left, and if it does not find a place to go, it will return to that which was cursed, only if it deserved to be cursed. Otherwise, the curse will return upon the one who made it.”
Source: Sunan Abī Dāwūd 4905
Grade: Jayyid (very good) according to Ibn Hajar
عَنْ أَبِي الدَّرْدَاءِ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّ الْعَبْدَ إِذَا لَعَنَ شَيْئًا صَعِدَتْ اللَّعْنَةُ إِلَى السَّمَاءِ فَتُغْلَقُ أَبْوَابُ السَّمَاءِ دُونَهَا ثُمَّ تَهْبِطُ إِلَى الْأَرْضِ فَتُغْلَقُ أَبْوَابُهَا دُونَهَا ثُمَّ تَأْخُذُ يَمِينًا وَشِمَالًا فَإِذَا لَمْ تَجِدْ مَسَاغًا رَجَعَتْ إِلَى الَّذِي لُعِنَ فَإِنْ كَانَ لِذَلِكَ أَهْلًا وَإِلَّا رَجَعَتْ إِلَى قَائِلِهَا
4905 سنن أبي داود كتاب الأدب باب في اللعن
10/467 المحدث ابن حجر العسقلاني خلاصة حكم المحدث إسناده جيد في فتح الباري لابن حجر