Wireless sensor network platforms are less expensive and more powerful having tiny electronic devices called motes (sensor nodes). Wireless sensor networks enhance its popularity in military and health centric research areas; now it is also popular in industrial area. Security is the main requirement of wireless sensor networks. This paper describes the network layer attacks which lead to subvert the network functionality. Amongst them, the wormhole attack is a severe threat to WSNs. This attack completely disrupts the network topology by altering the message, by relaying old and fake messages in the network.