What Is a Computer Worm? How They Spread

By George Bailey   Published: 12/04/26   Updated: 12/04/26   6 min read

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.

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

TypeHow it spreadsNeeds you to act?NIST description
WormCopies itself across networks or email on its ownOften noSelf-replicating, self-contained program that usually executes itself without user intervention
VirusAttaches to files or programs and spreads when they are shared and openedUsually yes, someone has to open or run the infected fileInfects an existing file or program
Trojan horseDoes not replicate; it pretends to be useful softwareYes, you install or run itSelf-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):

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

WormWhat happenedLessonSource
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 outageFBI
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 installedCISA alert TA17-132A

How to tell if a worm is involved

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

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

George Bailey

George Bailey is the byline of the CyberExperts editorial desk, the team behind the CyberExperts Daily Brief. The desk covers vulnerabilities, breaches and security news from vendor advisories, CISA alerts and other primary sources, and links those sources in every story. Questions or corrections: [email protected].