Ezekiel 18:19-20 says that a son shall not bear the guilt of the father because the son has done what is lawful and right, and has kept all God’s statutes and observed them. The inverse of this statement is therefore also true that: if the son of a sinful father (or mother indeed) is also living in sin then it is possible for the son to bear the guilt of the father in addition to punishment for the son’s own sins.
And for how many generations can this curse possibly continue for? We know from Exodus 20:5-6 that God can continue placing the punishment for iniquity of the father until the third and fourth generation that hates Him, while willing to show mercy to those who love Him even until the fourth generation (Also see 2 Kings 10:30). So we find the same principle from Ezekiel reflected here in Exodus: when we continue living in sin, we may open ourselves up to generational curses we know nothing about; but what breaks that chain, at least on your head, is righteous living!
Two examples from the Bible:
We know about Ahab, Jezebel’s husband, that “there was no one like Ahab who sold himself to do wickedness in the sight of the Lord” and for this, God pronounced a curse on Ahab for this wickedness in 1 Kings 21:20-26. But because Ahab humbled himself (v. 29) before God when he heard the punishment for his sins, God postponed the punishment to the days of his son. This was fulfilled by Jehu in 2 Kings 10:11, 17 when God instructed him to kill all seventy sons of Ahab and all the remainder of his family in fulfillment of the original curse on Ahab.
King Josiah’s grand father, King Manasseh, was the king who’s evils finally sealed the fate of the people of Judah (2 Kings 21:9-16) – NB: we studied the terrible consequences of King Manasseh’s sins and how to repent before God here. Follow me now: Josiah’s father (Manasseh’s son), King Amon, was evil and was killed by his servants in his own house. Then comes King Josiah, on who’s head a curse from his grandfather was still floating but he did what was right in the sight of God. In 2 Kings 22:18-20, God said that because Josiah’s heart was tender and he humbled himself before God, he will die in peace and his eyes won’t see the punishment God was to bring on the people of the land. 2 Kings 23:25 tells us that: