A worm it is not. Worms are legless and live in the ground. This is a caterpillar of some moth or butterfly. At this stage in their life, they are plant eaters. So the question is: is it a pest or not? Well, depends if you are gardening for butterflies or just for the plant. You get to decide 🙂 If there aren’t too many and they don’t defoliate the plant, live and let live. If it is decimating the plant, take the approach of knock off and squish. If you are too squimish for that, BT (sold as Dipel or Thuricide) is very environmentally safe and works wonders on any caterpillar type critter.