Network security risk forecast is a new research focus in the network security field. Though some research has been done on the forecast. Research of single intrusion attack incidents, of which some methods could predict impending single intrusion incidents or partial composite intrusion and attach behavior to some extent has been conducted. The security risk of networks has the memorylessness property of the Markov model. That indicates the network risk level of future times which is only related to the current state. Past states have no impact on future risk predictions. The traditional Markov model assumes that the transmission matrix does not vary along with time. In this work, we present a time-varying Markov model through updating the transmission matrix in real-time. In addition, we give the formulation of risk probability calculation. Based on this model, we are able to predict the incurring probability of network risks at a specific future time.