Sunan Ibn Majah, Volume 3, Book 20, Hadith 2609 (DarusSalam) ⓘ
It was narrated from Ibn Abbas that the Messenger of Allah said: “Whoever claims to belong to someone other than his father, or (a freed slave) who claims that his Wala is for other than his real master, the curse of Allah (SWT), the angels and all the people will be upon him.”
حَدَّثَنَا أَبُو بِشْرٍ، بَكْرُ بْنُ خَلَفٍ حَدَّثَنَا ابْنُ أَبِي الضَّيْفِ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ عُثْمَانَ بْنِ خُثَيْمٍ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنِ انْتَسَبَ إِلَى غَيْرِ أَبِيهِ أَوْ تَوَلَّى غَيْرَ مَوَالِيهِ فَعَلَيْهِ لَعْنَةُ اللَّهِ وَالْمَلاَئِكَةِ وَالنَّاسِ أَجْمَعِينَ " .
also referenced under: Hadith 2609 (Reference) & Book 20, Hadith 2707 (In-Book)