In wireless sensor networks, multi-hop localization schemes are very vulnerable to various attacks such as wormholes and range modification attacks. In this paper, we propose a robust multi-hop localization scheme, namely COTA, to mitigate various attacks in wireless sensor networks. In this scheme, each localized sensor generates a COnfidence TAg to quantify the quality of its estimated location and broadcasts both the confidence tag and the estimated location in reference messages. When receiving sufficient number of references, an unlocalized sensor filters out bad references and weighs the remaining ones according to their tags. Once location determination is done, the sensor generates its own confidence tag from the indicator of its localization error. By properly setting the filtering metrics and computing the confidence tags, COTA can prevent the proliferation of location errors and achieves accurate location estimations and high localized percentage for sensor networks. To our ...