Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) was asked about the child born of fornication, and he (peace and blessings be upon him) said: "He is the worst of the three." Sufyan (may Allah have mercy on him) said: (That is,) when he does the deeds of his parents.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19995