CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

low-risk

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").

Abstraction: Variant

Common Consequences

Confidentiality Read Files or Directories
Access Control Bypass Protection Mechanism
Access Control Gain Privileges or Assume Identity
Integrity Execute Unauthorized Code or Commands
Non-Repudiation Hide Activities

Detection Methods

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2024-36401 9.8 94.4% Y
CVE-2024-31982 10.0 94.3%
CVE-2025-24893 9.8 94.0% Y
CVE-2024-7954 9.8 93.7%
CVE-2024-21650 10.0 92.5%
CVE-2024-36404 9.8 90.7%
CVE-2023-37462 9.9 90.3%
CVE-2023-7101 7.8 83.3% Y
CVE-2013-10051 9.8 75.8%
CVE-2024-31984 9.9 60.1%
26
/ 100
low-risk
Active Threat 24/50 · Moderate
Exploit Availability 2/50 · Minimal