The dynamics of worm propagation in the Wireless Sensor Networks (WSNs) is one of the fundamental challenge due to critical operational constraints. In this paper we propose a modified Susceptible-Infectious-Quarantined-Recovered-Susceptible (SIQRS) model based on epidemic theory. The proposed model demonstrate the effect of quarantined state on worms propagation in WSNs. This model incorporates communication radius, area of communication and the associated node density. The spreading dynamics of worms defined with the help of Basic Reproduction Number (R0) and if R0 is less than or equal to one the worm-free equilibrium is globally asymptotically stable, and if R0 is greater than one the worm will persists in the system. This model formulated by differential equations and explain the process of worm propagation in WSNs. We also study the effect of different parameters on the performance of system. Finally, the control mechanism and performance of the proposed model is validated through extensive simulation results.