Recently, Wireless Sensor Networks (WSNs) have been deployed into a variety of applications including homeland security, military systems, and health care. Sensor nodes deployed in such networks are subject to several attacks such as sinkhole and select forwarding, wormhole, Hello flood, and replication attacks. Therefore, developing secure and energy-efficient routing protocols to protect WSNs against these attacks while efficiently utilizing the energy of the deployed nodes has become imperative. Several routing protocols have been proposed in the literature for WSNs. Most of these protocols assume static nodes and sinks to collect data from network fields. However, they may be highly movable, and recent advances show that mobile sensors in WSNs have a promising performance. Therefore, this paper surveys the state of the art on routing protocols related to WSNs and presents the security issues or problems associated with the current protocols as well as discusses the future trends and open research issues on secure routing protocols of WSNs.