Pharaoh Digs His Own Grave and the Serpent Who Bit Dinah
Kohelet Rabbah reads one verse as two portraits: Pharaoh who drowned babies and drowned himself, and Dinah who stepped outside and was never the same.
There is a verse in Ecclesiastes so terse it reads like a law of physics: "One who digs a pit will fall into it; and one who breaches a fence, a serpent will bite him" (Ecclesiastes 10:8). The rabbis of Kohelet Rabbah, writing in the land of Israel sometime in the 5th century CE, look at these two clauses and see two entirely different stories folded inside them -- stories about a king and about a girl, about public power and private exposure, about consequences that pursue their originators across time.
The pit-digger is Pharaoh. The verse he issued was precise and merciless: "Every son who is born, you shall cast into the Nile" (Exodus 1:22). He dug the pit. He specified the dimensions. He decreed the depth. And then, reads the midrash, "He shook Pharaoh and his people in the Red Sea" (Psalms 136:15). The same water he had chosen as his instrument of murder became the instrument of his own destruction. He did not fall into a pit metaphorically. He fell into the exact pit he had dug, which was not a hole in the ground but a body of water he had weaponized, and which then swallowed him.
The same verse gets applied to Haman. To destroy, to kill, and to eliminate -- that was Haman's decree (Esther 3:13). He designed a machine of destruction aimed at an entire people. The pit he dug for Mordechai became the gallows on which he and his sons were hanged. "His wicked intentions will return upon his head" (Esther 9:25). The Midrash reads both cases as illustrations of the same principle: the pit is always dug by the one who falls into it. The timing is God's business. The architecture is the tyrant's own work.
But the second half of the verse moves to a completely different kind of story. "One who breaches a fence, a serpent will bite him." This is Dinah. When her father Jacob and her brothers sat in the study hall, she went out "to see the daughters of the land" (Genesis 34:1). She stepped beyond the fence. And the man who came for her -- Shechem the son of Hamor the Hivite, called a serpent because "Hivite" in Aramaic is a word for snake -- bit her. The Torah's language is precise and terrible: "He took her. He lay with her. He raped her."
The midrash is not gentle here. It makes a direct causal link between the breach and what followed. This reading has troubled commentators for centuries, and rightly so -- but the rabbis were making a theological point rather than a moral judgment. They were trying to account for the mechanism of catastrophe. When the protection of the fence -- the community, the study hall, the careful structure of daily life -- is abandoned by choice, the serpent is not far away. The world outside the fence does not observe the rules inside it.
What makes the juxtaposition in the midrash remarkable is that it refuses to let either story stand alone. Pharaoh's story is about public, political evil -- a decree issued by a king against a people. Dinah's story is about personal, domestic vulnerability -- a young woman and a dangerous world. The same verse, the same principle, the same inexorable mechanism. The fence that Pharaoh breached was the covenant between creation and justice. The fence that Dinah stepped past was the one her family had built around her. Both breaches had consequences that arrived through what was already there, waiting.
The midrash then pivots abruptly -- and deliberately -- to Rabbi Shimon ben Yohai, who spent thirteen years hiding with his son in a cave in Pekin during Roman persecution. They ate carobs and dates. At the end of thirteen years, Shimon emerged and saw a trapper catching birds. He heard a divine voice say "Success" and a bird was trapped. He heard it say "Failure" and a bird escaped. He said: even a bird is not caught without a decree from heaven. All the more so a human soul. The cave was not just survival. It was a fence -- and one that God himself maintained.
When Shimon came out, he set about purifying Tiberias from unmarked graves left by the Roman conquest. A Samaritan tried to mock him by secretly burying a corpse on a street Shimon had already declared clean. Shimon saw through divine inspiration what had happened. He decreed that the one lying down should stand and the one standing should fall. So it happened. The man who had breached the fence of the sages was bitten by the same serpent he had released.
The Midrash Rabbah tradition, spanning from the 3rd through 7th centuries CE, is full of these structural symmetries. Pharaoh drowns and is drowned. Haman builds a gallows and is hanged on it. The person who breaches a fence provides the opening through which the serpent enters. The world, according to this reading, is not arbitrary. It is arranged so that every hole a person digs eventually becomes their own grave.
The unsettling thing is not the theology. It is the precision.