Abu Tufayl reported,

I was with Ali bin Abu Talib when a man came to him and asked, "What did the Prophet ﷺ confide in you privately?"He became angry and replied, "The Prophet ﷺ did not confide in me anything that he kept hidden from the people, except that he told me four statements."The man asked, "What are they, Commander of the Faithful?"He said, "Allah has cursed whoever curses his father. Allah has cursed whoever sacrifices to other than Allah. Allah has cursed whoever shelters an innovator. And Allah has cursed whoever alters the boundary markers of the land."

Azami 14919

Sahih

عن أبي الطفيل عامر بن واثلة قال

كنت عند علي بن أبي طالب، فأتاه رجل، فقال: ما كان النبي ﷺ يسر إليك؟ قال: فغضب، وقال: ما كان النبي ﷺ لا يسر إلي شيئا يكتمه الناس، غير أنه قد حدثني بكلمات أربع، قال: فقال: ما هن يا أمير المؤمنين؟ قال: قال: لعن الله من لعن والده، ولعن الله من ذبح لغير الله، ولعن الله آوى محدثا، ولعن الله من غير منار الأرض.

الأعظمي 14919صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Vices of character
Section
Prohibition of insulting one's parents
Numbering
Jami al-Kamil 14919 (2nd edition)
Azami 14919