The child belongs to the husband
it has reached me that the Messenger of Allah ﷺ decreed that the child belongs to the owner of the bed (husband) and the adulterer be stoned.
بَلَغَنِي أَنَّ رَسُولَ اللهِ ﷺ قَضَى أَنَّ الْوَلَدَ لِصَاحِبِ الْفِرَاشِ وَبِفِي الْعَاهِرِ الْحَجَرَ