Hadith 17:808
Isma'il ibn 'Ayyash narrated to us, from Sharhabil ibn Muslim, who said: I heard Abu Umamah al-Bahili saying: I heard the Messenger of Allah (may Allah bless him and grant him peace) saying: "Whoever claims to be the son of someone other than his father, or affiliates himself with someone other than his masters, then upon him is the curse of Allah, which is established until the Day of Resurrection."
حدثنا إسماعيل بن عياش عن شرحبيل بن مسلم قال سمعت أبا أمامة الباهلي يقول سمعت رسول الله صلى الله عليه وسلم يقول من ادعى إلى غير أبيه وانتمى إلى غير مواليه فعليه لعنة الله الثابتة إلى يوم القيامة