It's a hair worm. AFAIK, they have no capacity to drill holes in anything. It was likely just taking advantage of a pre-existing hole made by one of the many other creates that can drill them.
FWIW, a medusa "worm" is actually a small type of sea cucumber, not a worm.