In wireless sensor networks (WSNs), the main task of each sensor node is to sense the physical activity and then report it to a remote central monitoring sink node. For this, sensor nodes are attached with many sensors having ability to measure the environmental information. To investigate the virus propagation in WSNs, existing epidemiological models are global without consideration of behavior of WSN. Different from existing epidemic models, we propose Correlation-based susceptible-infectious-recovered epidemic model that takes into account of spatial correlation characteristics of a WSN. Firstly, we show that how strongly correlated nodes and less correlated nodes are formed in the a WSN based on sensing range. Using epidemic theory, the differential equations are derived and the stability analysis has been investigated to determine the threshold about spatial correlation based reproduction number for WSNs. Simulation results and comparative studies are presented to varify the numerical results using various parameters such as basic reproduction number, spatial correlation, node density, correlated nodes. Modeling demonstrates the effective virus propagation dynamics with time that can be used to design the prevention mechanisms to control the infections with time. Comparative studies show the significant performance improvement based on spatial correlation of nodes in a WSN.