Well since יהוה issued the law in the first place presumably he can make any exceptions he wants. Of course since Jews don’t believe Jesus was the son of god it’s kinda of a moot point.
I’m not sure if that is still the case under the current Code of Canon Law. A lot of those articles on the New Advent site are copied from an edition of the Catholic Encyclopaedia whose articles are based on the pre-1983 Code of Canon Law.
Getting back to the general question posed by the OP, in Canada I believe all provinces and territories have abolished the legal distinction between legitimate and illegitimate children. All children have the same rights with respect to inheritance, child support, etc.
What’s the situation in other countries under their civil laws (not canon law)?
What, no love for foreign bastards?