My ears heard and my heart retained Muhammad ﷺ saying, "Whoever claims descent from someone other than his true father, knowing that he is not his father, paradise is forbidden to him."
حدثنا علي بن محمد حدثنا أبو معاوية عن عاصم الأحول عن أبي عثمان النهدي قال
سمعت أذناي ووعى قلبي محمدا ﷺ يقول من ادعى إلى غير أبيه وهو يعلم أنه غير أبيه فالجنة عليه حرام
Sourced from Bukhari, Battles (Maghazi), Chapter on the Battle of Taif in Shawwal of the year eight, no. 4327, from the hadith of Asim, and Muslim, Faith (Iman), Chapter explaining the state of faith of one who disowns his father while knowing him to be his father, no. 63, from the hadith of Abu Muawiya, from the hadith of Asim Ahwal, with this same wording.