Marriage between first cousins are allowed in Judaism.
aish.comaish.com writes explicitly
It is permitted under Torah law for cousins to marry. In fact, the Sages seem to view marriages between relatives as desirable. The Talmud recommends that a person marry his niece (Yevamot 62b). (There’s a debate in the commentators if it applies specifically to a sister’s daughter or also to a brother’s[.)..] The assumption is that a person will have an especially close relationship with a close relative, perhaps because of their likely similar personalities and values. The reasoning may be the same for a cousin, but the Talmud doesn't mention it. (I should point out that for a woman to marry her nephew is forbidden from the Torah – Leviticus 18:12-13.)
Some point out that the daughters of Zelophehad married their cousins (Numbers 36:11) so the practice has good precedent. Some also suggest that cousin marriages are likely to engender fewer fights between the in-laws![...]
In terms of the genetic issues, [...] relatives who marry should be even more careful to do genetic screening in advance.
Note that a number of countries and US states forbid first-cousin marriage though.
Mamzerim are the children of an adulterous or incestuous union (e.g., a man and a married woman or of a brother and sister - but NOT of a man to to an unmarried woman).
See also Any decisions on the status of their children need to be considered by a qualified rabbi as there might be ways to disqualify the marriage here from R Maurice Lamm(e.g., on technical grounds) and avoid the mamzer status.