All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
This child is not related to your husband, and if that woman had that child from your husband through an illegitimate relationship, then the child is illegitimate and cannot be traced back to your husband. Besides, the child is not a Mahram to the daughters of your husband, and your husband is not required to provide for him or to have custody of him, etc. This child is to be traced back to his mother, who is also required to provide for him. For more information, refer to Fatwa 117362.
Moreover, custody of this is the right of his mother unless there is an impediment in her. In this case, the child’s custody is to be transferred to another woman who is the most deserving of custody after her such as her mother.
In principle, a Muslim is free from sin, so if your husband claims that he did not approach that woman in the first place, you should believe him until the opposite is proven. Even if it is proven that he fornicated with her, then you should mind his present not his past situation. If he repents and takes a righteous course, then his past should not harm you. Thus, there is no need to lose confidence in him merely due to a previous matter. So, resume your life with him, concentrate on rectifying him, and be keen on making your home a place that maintains faith.Allaah Knows best.