Abstract-Epidemic models have been used in recent times to model the dynamics of malicious codes in wireless sensor network (WSN). This is due to its open nature which provides an easy target for malware attacks aimed at disrupting the activities of the network or at worse, causing total failure of the network. The Susceptible-Exposed-Infectious-Quarantined-RecoveredSusceptible with a Vaccination compartment (SEIQR-V) model by Mishra and Tyagi is one of such models that characterize worm dynamics in WSN. However, a critical analysis of this model and WSN epidemic literature shows that it is absent essential factors such as communication range and distribution density. Therefore, we modify the SEIQR-V model to include these factors and to generate better reproduction ratios for the introduction of an infectious sensor into a susceptible sensor population. The symbolic solutions of the equilibriums were derived for two topological expressions culled from WSN literature. A suitable numerical method was used to solve, simulate and validate the modified model. Simulation results show the effect of our modifications.