SummaryAn attack on VANET known as a Sybil attack involves the attacker claiming or stealing multiple identities with the intent of causing havoc on the network's operation by disseminating false information. To protect the VANET network from Sybil attack, a variety of methods have been proposed. In order to compensate for the Sybil attack on VANETs, a rumor riding with salp swarm optimization (SSO) based Routing protocol is developed in this research work. The primary goal of this investigation is to discover how VANETs are vulnerable to the Sybil attack in order to improve their security. Rumor riding will be used to identify the Sybil attack in the suggested strategy. VANETs are protected by the Blowfish Algorithm, which uses SSO to select the best key for each network. The collective intelligence and dynamic adaptation of SALP swarm optimization algorithm enable efficient identification of rumor sources in complex networks. The algorithm is scalable, flexible, and adept at reducing false positives and negatives, making it suitable for large‐scale monitoring. Its parallel processing capabilities and robustness ensure rapid and reliable detection. Using the NS2 platform, the proposed method is compared to existing benchmark in terms of delay, packet delivery ratio (PDR), packet loss, throughput, and attack detection rate. The proposed SSO has reduced the packet loss by nearly 5% and delay by nearly 7%, when compared with existing techniques. The delivery ratio of packet for proposed model is increased up to 8% of PDR, when compared with ACO, PSO, and FA. According to this evidence, it is clear that the proposed SSO outperformed existing approaches in a variety of performance metrics.