Abstract Since cognitive radio (CR) networks could solve the spectrum scarcity problem, they have drawn much research in recent years. Artificial intelligence(AI) is introduced into CRs to learn from and adapt to their environment. Nonetheless, AI brings in a new kind of attacks specific to CR networks. The most powerful one is a self-propagating AI virus. And no spreading properties specific to this virus have been reported in the literature. To fill this research gap, we propose a virus spreading model of an AI virus by considering the characteristics of CR networks and the behavior of CR users. Several important observations are made from the simulation results based on the model. Firstly, the time taken to infect the whole network increases exponentially with the network size. Based on this result, CR network designers could calculate the optimal network size to slow down AI virus propagation rate. Secondly, the anti-virus performance of static networks to an AI virus is better than dynamic networks. Thirdly, if the CR devices with the highest degree are initially infected, the AI virus propagation rate will be increased substantially. Finally, it is also found that in the area with abundant spectrum resource, the AI virus propagation speed increases notably but the variability of the spectrum does not affect the propagation speed much.