14 And the LORD God said unto the serpent, Because thou hast done this, thou art cursed above all cattle, and above every beast of the field; upon thy belly shalt thou go, and dust shalt thou eat all the days of thy life:
Commentary
This suggests that snakes originally had legs and lost them as part of the curse related to Man’s fall. Indeed a fossil snake with small hind legs had been found. The most likely explanation for this fossil is that at the fall God turned off the genes in a snake for making legs and in some cases before the Genesis Flood a mutation turn it back on enough to produce legs in an unless, or reduced function form.
There is also a documented cased of a snake that grew a leg as shown above. This consistent with this verse where snakes still have the gene to make legs but they are normally turned off as part of this curse.