Abu Muawiya reported,

...to the end. He added in the hadith, "Whoever betrays the protection granted to a Muslim, upon him is the curse of Allah, the angels, and all people. No obligatory or voluntary act will be accepted from him on the Day of Resurrection."In their two reports there is no mention of "whoever claims descent from someone other than his father," and in Waki's narration there is no mention of the Day of Resurrection.

Muslim 3328

Sahih

و حدثني علي بن حجر السعدي أخبرنا علي بن مسهر ح و حدثني أبو سعيد الأشج حدثنا وكيع جميعا عن الأعمش بهذا الإسناد نحو حديث أبي كريب

عن أبي معاوية

إلى آخره وزاد في الحديث فمن أخفر مسلما فعليه لعنة الله والملائكة والناس أجمعين لا يقبل منه يوم القيامة صرف ولا عدل وليس في حديثهما من ادعى إلى غير أبيه وليس في رواية وكيع ذكر يوم القيامة

مسلم 3328صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Hajj
Chapter
Virtue of Madinah, the supplication of the Prophet ﷺ for blessings in it, the declaration of its sanctity, the prohibition of its game and trees, and the boundaries of its sacred precinct
Numbering
Darussalam 3328
Muslim 3328