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 modern understanding of "worm" as a creature with specific characteristics is rooted in William Morris's book, "The Life and Death of Jason," published in 1867. The word has evolved over time, with its current meaning emerging around the year 1000 AD.