In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Incorrect DNA paternity test results must be immediately corrected and the child must be traced to his/her legitimate father. As a result, it is not lawful to give DNA paternity test result priority over maxims and proofs from Islamic law.
Answering your question, Dar Al-Ifta Al-Misriyyah, states:
Islamic law exercises extreme caution in matters related to paternity. Consequently, it is only acceptable to rely on DNA paternity testing after taking extremely strict measures to prevent mistaken paternity and protect honor.
The Islamic Fiqh Assembly of the Muslim World League issued in its sixth session held from 22-26/10/1422 AH (5-10/1/2002 AD) the following resolution:
“DNA testing to trace lineage must be handled with utmost caution and confidentiality. It is not lawful to give it priority over maxims and proofs from Islamic law.”
Accordingly, incorrect DNA paternity test results must be immediately corrected and the child must be traced to his/her legitimate father. The child becomes a [genetic] stranger to the wrong father.
Almighty Allah knows best.
Source:Dar Al-Ifta Al-Misriyyah