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 is His slave and Messenger.
If the situation is as you mentioned in the question, then this boy is a child born out of an illicit relationship (Zina [fornication/adultery]), so he is not traced back to your husband; rather, he is traced back to his mother according to the preponderant opinion of the scholars and this is the view of the majority of the jurists . Therefore, your husband does not have any responsibility towards this boy; rather, it is his mother who is obligated to nurture him. However, Imaam Abu Haneefah is of the view that if a man commits Zina with a woman and she becomes pregnant from him, then he may marry her in order to conceal her sin and the child will be traced back to him.
Also, the jurists differed in opinion about the ruling of marrying a fornicatress before making sure that she is not pregnant; some of them permitted it and some of them forbade it. If the marriage took place before making sure that she is not pregnant while fulfilling the conditions of a correct marriage contract, the most important of which are the consent and presence of the guardian and the presence of two witnesses, then the marriage is valid according to the view of those who consider it to be valid before making sure that she is not pregnant.
However, if your husband had divorced that woman, then his divorce is effective even if he did not have witnesses; as having witnesses for divorce is desirable and not an obligation.
Indeed, your husband did well by regretting what he did, but he should sincerely repent; for more benefit on sincere repentance, please refer to Fatwa 87903.
On the other hand, your husband was wrong to inform you about that relationship and him committing Zina, because he should have concealed his sin; it is confirmed that the Prophet said: “All my Ummah [nation] is pardoned [by Allaah] [for what they commit] except those who sin openly and disclose their sin to the people. An example of such disclosure is that a person commits a sin at night and though Allaah screened it from the public, he comes in the morning, and says, "O so-and-so, I did such-and-such (evil) deed yesterday', though he spent his night screened by his Lord (none knowing about his sin) and in the morning he removes Allaah's screen from himself".” [Al-Bukhari and Muslim]
Allaah Knows best.