The latest citation with this meaning is from William Morris's book The Life and Death of Jason (1867). The modern sense of worm as goes back as far as 1000.
The latest usage of "worm" meaning goes back to William Morris's book The Life and Death of Jason (1867).  The modern sense of "worm" dates back to 1000 AD.