An important challenge in large scale deployment of vehicular ad hoc networks is securing these networks against potential cyberattacks. An attack scenario with potentially catastrophic consequences is the outbreak of a worm epidemic in these networks, which can start by infecting the onboard computer of a single vehicle and spreads through the whole network by transmission from vehicle to vehicle. In this paper we investigate the outbreak of worm epidemics in highway traffic by means of modeling and large-scale simulations. Our study combines a realistic model of node movements in VANET with a velocity-dependent shadow-fading model of wireless links between VANET nodes, and takes into account the full topology of the resulting ad hoc networks. We perform stochastic simulations of worm spreading under various traffic conditions, both in the absence and in the presence of preemptive immunization and an interactive patching process. We find that worm epidemics in VANET has an initial linear growth rate which is much slower than the exponential growth predicted by classical epidemiological models, and observed in worm attacks on the Internet. The dynamics of worm propagation in VANET shows a strong dependence on node mobility patterns and traffic conditions.