Here’s an article on consanguinity which can give you historical information:
The current canons are:
Can. 1091 §1. In the direct line of consanguinity marriage is invalid between all ancestors and descendants, both legitimate and natural.
§2. In the collateral line marriage is invalid up to and including the fourth degree.
§3. The impediment of consanguinity is not multiplied.
§4. A marriage is never permitted if doubt exists whether the partners are related by consanguinity in any degree of the direct line or in the second degree of the collateral line.
Can. 1092 Affinity in the direct line in any degree invalidates a marriage.
Can. 1093 The impediment of public propriety arises from an invalid marriage after the establishment of common life or from notorious or public concubinage. It nullifies marriage in the first degree of the direct line between the man and the blood relatives of the woman, and vice versa.
Can. 1094 Those who are related in the direct line or in the second degree of the collateral line by a legal relationship arising from adoption cannot contract marriage together validly.
In the collateral line, cousins for example, the impediment can be dispensed. In the direct line, it cannot.