Applications for Unmanned Aerial Vehicles (UAVs), operating in unlicensed bands, are vastly growing with the consolidation of the Internet of Things (IoT). However, those bands have become overcrowded as systems using them are continuously increasing. In this context, Cognitive Radio (CR) and spectrum sharing techniques have emerged as promising strategies to overcome the problem of spectrum scarcity in wireless networks, thus being considered as enabling technologies for the future 5G wireless networks. Thereby, the integration of CR with UAVs can bring important benefits for the massive deployment of UAVs. This paper aims to present an overview on the state of the art of CR technology for UAV communication, as well as indicate key opportunities and future challenges.