Jabir (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "Do not invoke curses on yourself or on your children or on your possessions lest you should happen to do it at a moment when the supplications are accepted, and your prayer might be granted."[Muslim].
App reference: Book 17, Hadith 33
Arabic/English book reference: Book 17, Hadith 1497