CWE-506: Embedded Malicious Code

What is CWE-506?

MITRE CWE

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

Verify to analyze this CWE entry

A short verification protects the official data source and prevents automated AI abuse.

Detailed description

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Characteristics

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Common consequences

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Mitigations

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Detection methods

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.

Representative vulnerabilities

CyStack is analyzing this CWE entry. The page will update automatically when the bilingual analysis is ready.
Official MITRE CWE dataMITRE CWE

Original source fields and evidence from the MITRE CWE record.

Official definition

MITRE 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.

Modes of introduction

  • Implementation
  • Bundling
  • Distribution
  • Installation

Common consequences

  • Confidentiality, Integrity, Availability

    Execute Unauthorized Code or Commands

Mitigations

  • 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

  • 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 InspectionEffectiveness: SOAR 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 ExecutionEffectiveness: SOAR 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)Effectiveness: SOAR Partial
  • Automated Static AnalysisAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Origin AnalysisEffectiveness: SOAR Partial

Representative vulnerabilities

These examples illustrate this CWE entry and are not an exhaustive list of related vulnerabilities.

  • CVE-2022-30877A command history tool was shipped with a code-execution backdoor inserted by a malicious party.

Sources and references

References

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.

Explore CyStack VulnScan
CyStack VulnScan dashboard