Mamzer/bastard is not to marry a Jewish woman
“A bastard shall not enter the assembly of God “Devarim 23:3
The term mamzer/ bastard denotes a person who issued for a sexual relationship punishable with spiritual severance. Excluding a woman ritually unclean from her menses, her child is of defective status but not a mamzer.
Both male and female are forbidden forever. Male and female mamzer may marry converts to Judaism and their children have the status of mamzer.
If someone was born to an unmarried women and did not say who the father is, or she said I conceived form a mamzer- the child is an “undetermined mamzer”.
Also if a child was found in the market place and neither the mother or father is known, is an “undetermined mamzer”.
By Torah law an “undetermined mamzer” is permitted to marry into the community, but the Scribes forbid them to marry into the community. They are also forbidden to marry a mamzer or an “undetermined mamzer”.
There is a mamzer by the law of the Scribes for example if a woman heard that her husband died and she remarried but her husband was actually alive. Then her first husband was sexually intimate with her while she was living with the other man. The son is a mamzer by the law of the Scribes.
A mamzer by the law of the Scribes is permitted only to marry another mamzer by the law of the Scribes.
This applies in all places at all times.