Abu Huraira (may Allah be pleased with him) narrates that he heard the Prophet (ﷺ) say: When the verses of li'an were revealed, the Prophet (ﷺ) said: "Any woman who brings into a people someone who does not belong to them (i.e., bears a child through adultery), for her there is no good from Allah, nor will Allah admit her to Paradise. And any man who denies his child, despite the fact that he looks like him, Allah will veil Himself from him and will disgrace him before all the people, the first and the last."
Hadith Referenceمسند الإمام الشافعي / كتاب اللعان / 1345
Hadith Takhrijاخرجه ابوداؤد ،الطلاق، باب التغليظ في الانتفاء (2263) والنسائي الطلاق، باب التغليظ في الإنتفاء من الولد (3511) - وصححه الحاكم: 2/ 202 ، 203 - وابن الحبان۔