CWE-506: Embedded Malicious Code

What is CWE-506?

CWE-506 is Embedded Malicious Code. The flaw arises when the product contains code that appears to be malicious in nature. The database currently holds 11 vulnerabilities mapped to CWE-506 and 4 of them are in the CISA Known Exploited Vulnerabilities catalog.

The analysis could not be completed. Please try again.

OWASP TOP 10:2025 RANK8 — A08:2025 — Software or Data Integrity Failures
Related CVES (365 days)11
AbstractionClass
Likelihood of exploit-

Vulnerabilities mapped to CWE-506

11 vulnerabilities267% increase year over year

Vulnerabilities in CISA KEV for CWE-506

4 vulnerabilities

Official definition

ByMitre CWE

The product contains code that appears to be malicious in nature.

Malicious flaws have acquired colorful names, including Trojan horse, trapdoor, timebomb, and logic-bomb. A developer might insert malicious code with the intent to subvert the security of a product or its host system at some time in the future. It generally refers to a program that performs a useful service but exploits rights of the program's user in a way the user does not intend.

Characteristics

Modes of introduction

  • Implementation
  • Bundling
  • Distribution
  • Installation

Common consequences

ImpactScopeExplanation
Execute Unauthorized Code or CommandsConfidentiality, Integrity, Availability-

Risk mitigations

  1. Implementation, OperationRemove the malicious code and start an effort to ensure that no more malicious code exists. This may require a detailed review of all code, as it is possible to hide a serious attack in only one or two lines of code. These lines may be located almost anywhere in an application and may have been intentionally obfuscated by the attacker.

Detection methods

MethodApproachEffectiveness
Manual Static Analysis - Binary or BytecodeAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies Generated Code InspectionSOAR Partial
Dynamic Analysis with Manual Results InterpretationAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Automated Monitored ExecutionSOAR Partial
Manual Static Analysis - Source CodeAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Manual Source Code Review (not inspections)SOAR Partial
Automated Static AnalysisAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Origin AnalysisSOAR Partial

Representative vulnerabilities

Below are representative vulnerabilities related to this CWE, prioritized by severity.

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.