---
title: "CWE-509: Replicating Malicious Code (Virus or Worm)"
url: https://radicalnotion.ai/cwe/cwe-509
type: cwe
description: "Replicating malicious code, including viruses and worms, will attempt to attack other systems once it has successfully compromised the target system or the product."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-509: Replicating Malicious Code (Virus or Worm)

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 1
- **Of those, in CISA KEV:** 0
- **New in 2026:** 0
- **CWE catalog version:** 4.21

## Description

Replicating malicious code, including viruses and worms, will attempt to attack other systems once it has successfully compromised the target system or the product.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |
| Operation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Availability | Execute Unauthorized Code or Commands | - |

## Potential mitigations

### Operation

Antivirus software scans for viruses or worms.

### Installation

Always verify the integrity of the software that is being installed.

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2017-16127 | pandora-doomsday is malware | critical | 9.8 | - | No | 2018-06-07 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-507](https://radicalnotion.ai/cwe/cwe-507) | Trojan Horse |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| Landwehr | Replicating (virus) | - | - |

## Frequently asked questions

### What is CWE-509?

Replicating malicious code, including viruses and worms, will attempt to attack other systems once it has successfully compromised the target system or the product.

### What CVEs are caused by CWE-509?

1 recorded CVE is attributed to CWE-509: CVE-2017-16127.

### How do you prevent CWE-509?

Antivirus software scans for viruses or worms.

### What are the consequences of CWE-509?

Exploiting CWE-509 can lead to: Execute Unauthorized Code or Commands.

### Is CWE-509 actively exploited?

1 recorded CVE is caused by CWE-509; it is not currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/509.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-509). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
