Gnostic Creation Midrash
A Gnostic midrash embedded in the third tractate of Codex IX from Nag Hammadi, (47.14-48.7):
But of what sort is this God? First [he] maliciously refused Adam from eating of the tree of knowledge. And secondly he said, 'Adam, where are you?' God does not have foreknowledge; (otherwise), would he not know from the beginning? [And] afterwards he said, 'Let us cast him [out] of this place, lest he eat of the tree of life and live forever.' Surely he has shown himself to be a malicious grudger. And what kind of a God is this? For great is the blindness of those who read, and they did not know him. And he said, 'I am the jealous God; I will bring the sins of the fathers upon the children until three (and) four generations.'
And in one place, Moses writes, "He made the devil a serpent <for> those whom he has in his generation." Also, in the book which is called "Exodus," it is written thus: "He contended against the magicians, when the place was full of serpents according to their wickedness; and the rod which was in the hand of Moses became a serpent, (and) it swallowed the serpents of the magicians."
Again it is written, "He made a serpent of bronze (and) hung it upon a pole ...
... (1 line unrecoverable)
... which [...] for the one who will gaze upon this bronze serpent, none will destroy him, and the one who will believe in this bronze serpent will be saved." (Cf. Gen. 2:17; 3:22; Exod. 20:5; Numbers 21:9)
- Birger Pearson, Gnosticism, Judaism and Egyptian Christianity, 1990