Caterkiller

Caterkiller is a wall-climing enemy in Mega Man X3. It shoots out energy from its spines. It looks more like a cactus than a worm, though.

Fun Facts
Coincidentally, there is a Sonic the Hedgehog enemy called "Caterkiller", and unlike the Mega Man X3 one, it does indeed look like a caterpillar.