Modeling and stability analysis of the propagation of a worm