Definitions checked against NIST, the FBI and CISA on December 4, 2026.
What is a computer worm?
A computer worm is a self-replicating, self-contained piece of malware that spreads from computer to computer over a network, usually without anyone clicking anything. Unlike a virus, it does not need to attach itself to a file or program (NIST SP 800-83). That is why a single worm can spread to thousands of machines very quickly.
Unlike a worm, a trojan cannot spread on its own. See what a trojan horse is.
Get the free 5-minute weekday brief
Scam alerts you can act on, major breaches, and our free Scam Survival Kit (PDF). Free, every weekday.
By subscribing you agree to our Privacy Policy.
For everyday readers, small businesses and security teams. Unsubscribe anytime.
NIST’s glossary describes a worm as a self-contained program that can propagate itself through data processing systems or computer networks, and notes that worms are often designed to use up available resources such as storage space or processing time (NIST glossary: worm). The FBI makes the same distinction: computer worms, unlike viruses, do not need a software host but can exist and propagate on their own (FBI: Morris Worm).
Worm vs virus vs trojan
| Type | How it spreads | Needs you to act? | NIST description |
|---|---|---|---|
| Worm | Copies itself across networks or email on its own | Often no | Self-replicating, self-contained program that usually executes itself without user intervention |
| Virus | Attaches to files or programs and spreads when they are shared and opened | Usually yes, someone has to open or run the infected file | Infects an existing file or program |
| Trojan horse | Does not replicate; it pretends to be useful software | Yes, you install or run it | Self-contained, nonreplicating program that appears benign but has a hidden malicious purpose |
For the everyday version of the virus idea, see our plain-English guide on what a computer virus is.
How worms spread
NIST splits worms into two main categories (NIST SP 800-83 Rev. 1):
- Network service worms take advantage of a vulnerability in a network service to spread to other hosts. They need no email and no click: an unpatched, reachable system is enough.
- Mass-mailing worms are similar to an email-borne virus but are self-contained rather than infecting an existing file. They send copies of themselves to the victim’s contacts.
NIST’s malware guide also lists common weak points that help malware spread, including unsecured file shares and automatic execution of programs (such as AutoRun on Windows), and recommends disabling or removing network services that are not needed.
Famous worms and what they teach
| Worm | What happened | Lesson | Source |
|---|---|---|---|
| Morris Worm (1988) | Released on November 2, 1988. Within 24 hours an estimated 6,000 of the roughly 60,000 computers then connected to the Internet were hit. It used several attack routes, including a flaw in the Unix “finger” program and a backdoor in the email system. It did not destroy files, but systems slowed to a crawl and some institutions disconnected from the network for as long as a week. | Multiple spread routes and no off switch make a small mistake a very large outage | FBI |
| WannaCry (2017) | Ransomware that spread by itself across networks using the MS17-010 (EternalBlue) flaw in Windows SMBv1. Microsoft had released a security update for the flaw on March 14, 2017. | A patch available for weeks does nothing until it is installed | CISA alert TA17-132A |
How to tell if a worm is involved
- Many machines on the same network slow down or fail around the same time.
- Unusual spikes in network traffic, or devices trying to connect to lots of other devices.
- Mass emails or messages sent from accounts without the owner doing it.
- Security software alerts for the same malware on several devices.
- A ransom note or encrypted files on more than one computer (as in WannaCry).
If you suspect a worm, disconnect the affected device from the network (unplug the cable or turn off Wi-Fi), do not forward suspicious messages, and tell your IT contact. Do not assume the first infected machine is the only one.
How to protect a home or small-business network
- Install updates, and turn on automatic updates. CISA says to install updates as soon as possible and to turn on automatic updates (CISA: Update Software). Network worms like WannaCry exploit flaws that already have patches.
- Turn off services you do not need, especially ones reachable from the Internet, and remove unsecured file shares (NIST lists both).
- Use a firewall so unwanted traffic from outside cannot reach your devices. Our guide to setting up a firewall explains the basics.
- Run security software and keep it updated, so known worms are blocked.
- Do not open unexpected attachments, which is how mass-mailing worms spread.
- Keep backups that are not always connected to your network, so you can recover if a worm destroys or encrypts files.
For a longer checklist, read how to secure your computer from virus threats. For the short definition, see our worm encyclopedia entry.
Frequently asked questions
What is a computer worm in simple words?
A computer worm is a program that copies itself from one computer to another across a network, often without any action from the user. Unlike a virus, it does not need to attach to a file or program to spread.
What is the difference between a worm and a virus?
A virus attaches to a file or program and spreads when that file is shared and opened. A worm is self-contained and spreads on its own. The FBI describes it this way: worms, unlike viruses, do not need a software host. Source: FBI.
How do computer worms spread?
NIST describes two main types: network service worms, which exploit a vulnerability in a network service, and mass-mailing worms, which send copies of themselves by email. Source: NIST SP 800-83 Rev. 1.
What is a famous example of a computer worm?
The Morris Worm, released on November 2, 1988, is the best known early example. The FBI says an estimated 6,000 of about 60,000 connected computers were hit within 24 hours. Source: FBI.
Is WannaCry a worm?
WannaCry was ransomware that spread automatically between computers using the MS17-010 (EternalBlue) flaw in Windows SMBv1, which is worm-like behavior. Microsoft released a patch on March 14, 2017. Source: CISA.
How can I protect myself from worms?
Install updates promptly and turn on automatic updates, use a firewall, disable unneeded network services, run up-to-date security software, avoid unexpected attachments and keep offline backups. CISA recommends installing updates as soon as possible. Source: CISA.
Sources
- NIST CSRC Glossary: worm
- NIST SP 800-83 Rev. 1: Guide to Malware Incident Prevention and Handling for Desktops and Laptops (PDF)
- FBI History: Morris Worm
- CISA Alert TA17-132A: Indicators Associated With WannaCry Ransomware
- CISA: Secure Our World, Update Software
Start your morning with the signal that matters.
Get the biggest cybersecurity developments, why they matter, and where to go deeper on CyberExperts.
By subscribing you agree to our Privacy Policy.
For everyday readers, small businesses and security teams. Unsubscribe anytime.