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. Acid Burst causes them to malfunction and paralyse.

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