Hi! I have a Blc Gold Bug that is in about a 3 inch sized pot. I accidently bumped it off onto the floot the other day

and the plant and bark came tumbling out of the container. When I was trying to put it all back together I noticed a teeny tiny worm wiggling on a piece of the bark. Can anyone tell me what it might be, if it is harmful, and if the worm might some how spread to my other plants? What should I use to get rid of it? Thanks!