In the Old Testament, the “bastard” is the translation of the Hebrew word mamzer, which means “polluted.”
In Deuteronomy 23:2, it is used in the common sense of illegitimate offspring.
In Zechariah 9:6, the word is used in the sense of foreigner.
From the history of Jephthah, we learn that there were bastard offspring among the Jews (Judges 11:1-7).
In Hebrews 12:8, the word (Greek: nothoi) is used in its ordinary sense, and denotes those who do not share the privileges of God’s children.