Abu Tufayl reported,

We said to Ali bin Abu Talib, "Tell us something that the Messenger of Allah ﷺ confided to you in secret."He replied, "He did not confide to me anything that he kept hidden from the people, but I heard him say, 'Allah has cursed whoever sacrifices to other than Allah. Allah has cursed whoever shelters a criminal. Allah has cursed whoever curses his parents. And Allah has cursed whoever alters the boundary markers of the land.'"

Azami 5918

Sahih

عن أبي الطفيل قال

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

الأعظمي 5918صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Injustices and usurpation
Section
Punishment for one who wrongs anyone regarding any portion of land
Numbering
Jami al-Kamil 5918 (2nd edition)
Azami 5918