Cognitive radios (CRs), which are capable of sensing its surrounding environment and adapting its internal parameters, have been considered in mobile ad hoc networks (MANETs). The area of security in CR-MANETs has received far less attention than other areas. However, some distinct characteristics of CRs introduce new non-trivial security risks to CR-MANETs. In this article, the authors study spectrum sensing data falsification (SSDF) attacks to CR-MANETs, in which intruders send false local spectrum sensing results in cooperative spectrum sensing, and it will result in wrong spectrum sensing decisions by CRs. The authors present a novel bio-inspired consensus-based cooperative spectrum sensing scheme to counter SSDF attacks in CR-MANETs. Their scheme is based on recent advances in consensus algorithms that have taken inspiration from self-organising behaviour of animal groups such as birds, fish, ants, honeybees and others. Unlike the existing schemes, there is no need for a common receiver to do the data fusion for reaching the final decision to counter SSDF attacks. The scheme has self-configuration and self-maintenance capabilities. Moreover, in order to further improve the security of CR-MANETs, the authors present an authentication scheme using identity (ID)-based cryptography with threshold secret sharing. Simulation results are presented to show the effectiveness of the proposed schemes.