While cognitive radio networks (CRNs) present a promising solution to solve the scarcity of the radio spectrum, they are still susceptible to security threats. Until now, only a few researchers considered the use of intrusion detection systems (IDSs) to combat these threats against CRNs. In this article we describe a CRN based on IEEE wireless regional area network (WRAN) and describe some of the security threats against it. For the secondary users in the CRN to quickly detect whether they are being attacked, a simple yet effective IDS is then presented. Our proposal uses non-parametric cumulative sum (cusum) as the change point detection algorithm to discover the abnormal behavior due to attacks. Our proposed IDS adopts an anomaly detection approach and it profiles the CRN system parameters through a learning phase. So, our proposal is also able to detect new types of attacks. As an example, we present the case of detection of a jamming attack, which was not known to the IDS beforehand. The proposed IDS is evaluated through computer based simulations, and the simulation results clearly indicate the effectiveness of our proposal.