Praise be to Allah, The Lord of The Worlds ;and may His peace and blessings be upon Prophet Muhammad and upon His Family and companions.
Islamic Sharia exercises extreme caution regarding the issue of lineage ;therefore, it is acceptable to rely on DNA only after taking extreme and strict measures in order to prevent mixing of lineages, and to preserve honor.
In its sixth session held (22-26/10/1422AH), corresponding to (5-10/1/2002AD), the Assembly of Islamic Fiqh supervised by the Islamic World League issued a resolution that read as follows: "The use of DNA in tracing lineage must be handled with extreme caution and confidentiality, thus Sharia texts and rules must be given precedence over DNA.”
Accordingly, any mistake in the DNA must be corrected immediately and the child in question must be traced to his/her legitimate father. By setting the records straight, that child becomes a stranger to the wrong/illegitimate father. And Allah knows best.