The economic situation highlights the significant role of the application of computer in human society since the 21st century, especially since 2015. This thesis probes into the security risk propagation of immune mechanism under complex network background. Focusing on the issue of network security under network background, the thesis deploys the analysis by adopting the mechanism model of immune mechanism, immunizing parts of the nodes, establishing stochastic immune mechanism of security risk and introducing stochastic immune mechanism propagation model of security risk. To further study the security risk propagation of immune mechanism under complex network background, the thesis presents the model rules, introduces the security risk acquaintance immune mechanism and establishes models of acquaintances immune mechanism. Finally, attributing to the simulation experiments, the simulation results, the characteristics of security risk propagation model, and the study of stochastic immune mechanism propagation model and acquaintance immune mechanism stochastic model, the thesis reaches the conclusion that at the initial stage of propagation, the die-out rate of the security risk is inversely proportional to the propagation rate.