CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine

low-risk

The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.

Abstraction: Base

Common Consequences

Integrity Execute Unauthorized Code or Commands

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-4040 9.8 94.4% Y
CVE-2024-23692 9.8 94.3% Y
CVE-2024-32651 10.0 92.6%
CVE-2025-47916 10.0 90.7%
CVE-2024-6386 9.9 73.9%
CVE-2025-49619 8.5 73.5%
CVE-2022-0944 7.2 73.2%
CVE-2024-28116 8.8 62.2%
CVE-2025-49136 9.0 61.8%
CVE-2022-25813 7.5 60.1%
13
/ 100
low-risk
Active Threat 12/50 · Low
Exploit Availability 1/50 · Minimal