Providing a secure routing algorithm that defend against node compromise is a challenging task in sensor networks. In this paper, we propose a proactive secure routing algorithm (PSR) to conquer the undetected compromised nodes-the compromised nodes that the system has not detected them yet. Compared with other secure routing algorithms or ideas, routing paths in PSR not only bypass the detected compromised nodes but also bypass the nodes with larger probabilities of being compromised. To estimate the probability of node compromise, we introduce a node compromise distribution model. Simulations show that PSR is effective to prevent routing path from passing compromised nodes whether detected or not.