The Messenger of Allah ﷺ said, "Among the greatest of major sins is that a man curses his own parents."Someone asked, "Messenger of Allah, how could a man curse his own parents?"He replied, "A man insults another man's father, so that man insults his father in return, and he insults his mother."
قال رسول الله ﷺ: إن من أكبر الكبائر أن يلعن الرجل والديه قيل: يا رسول الله، وكيف يلعن الرجل والديه؟ قال: يسب الرجل أبا الرجل، فيسب أباه، ويسب أمه.
Bukhari narrated it in al-Adab (5973), and Muslim in al-Iman (90), both through the route of Saad bin Ibrahim, from Humayd bin Abdul-Rahman, from Abdullah bin Amr bin As, and he mentioned it. The wording is that of Bukhari.