In the military and emergency preparedness class of applications, wireless sensor networks have a number of desirable characteristics, such as being autonomous systems that can be deployed in a remote - possibly hostile - environment and can perform tasks like battlefield surveillance or enemy tracking, as well as monitor the security of military facilities. One of the main challenges in this kind of application is security. Due to their key role in WSNs and also their fragility, localization systems can be the target of an attack that could compromise the entire functioning of a WSN and lead to incorrect military plans and decision making, among other problems. In this article we show how current localization systems are vulnerable to these security attacks, and how existing techniques can be used to prevent or impede these attacks in WSNs.