2,177. The Exception

Hilchos Issurei Biah 15:6

If a non-Jew is intimate with a servant woman who immersed in a mikvah, their offspring are servants. If a servant who immersed in a mikvah is intimate with a non-Jewish woman, their offspring are non-Jews, just like their mother. However, if a non-Jew is intimate with a non-Jewish servant woman, or if a non-Jewish servant is intimate with a non-Jewish woman, then the children’s status follows their father.

Hilchos Issurei Biah 15:7

A mamzer may marry a convert woman and a mamzeres may marry a convert man; the children of either union are mamzerim because their status follows the lesser parent. Such marriages are permitted because Deut. 23:3 prohibits a mamzer from joining the general marriage pool and converts are not considered the general marriage pool.