CWE · MITRE source
CWE-1336Improper Neutralization of Special Elements Used in a Template Engine
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.
Many web applications use template engines that allow developers to insert externally-influenced values into free text or messages in order to generate a full web page, document, message, etc. Such engines include Twig, Jinja2, Pug, Java Server Pages, FreeMarker, Velocity, ColdFusion, Smarty, and many others - including PHP itself. Some CMS (Content Management Systems) also use templates. Template engines often have their own custom command or expression language. If an attacker can influence input into a template before it is processed, then the attacker can invoke arbitrary expressions, i.e. perform injection attacks. For example, in some template languages, an attacker could inject the expression "{{7*7}}" and determine if the output returns "49" instead. The syntax varies depending on the language. In some cases, XSS-style attacks can work, which can obscure the root cause if the developer does not closely investigate the root cause of the error. Template engines can be used on the server or client, so both "sides" could be affected by injection. The mechanisms of attack or the affected technologies might be different, but the mistake is fundamentally the same.
Last updated: 15 October 2026 20:36 UTC
Control responseHuman-reviewed
Answering this weakness across the control lifecycle, from our framework cross-walks.
NIST 800-53 r5 controls PROPOSED for this weakness (0)AI-assisted
These are model PROPOSALS, not graded mappings. They come
from controls_to_cwe_proposals, which carries no grade field at
all; across the CWE pages 1,540 of 1,722 such associations (89%) have never
been graded by anything. The heading said “address” until
2026-09-29, which asserted a relationship the data does not carry.
Graded cross-walks are on the framework map, not here.
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2024-32651 UPD | 10.0 | 10.0 | 0.8360 | 2024-04-26 |
CVE-2025-47916 UPD | 10.0 | 10.0 | 0.8419 | 2025-05-16 |
CVE-2026-75650 KEV | 10.0 | 10.0 | 0.0395 | 2026-09-07 |
CVE-2024-4040 KEV UPD | 9.9 | 9.8 | 0.9954 | 2024-04-22 |
CVE-2024-23692 KEV UPD | 9.9 | 9.8 | 0.9949 | 2024-05-31 |
CVE-2024-24724 UPD | 8.7 | 9.8 | 0.2609 | 2024-04-03 |
CVE-2024-6386 UPD | 8.4 | 9.9 | 0.2553 | 2024-08-21 |
CVE-2022-25813 UPD | 8.3 | 7.5 | 0.6726 | 2022-09-02 |
CVE-2025-53833 UPD | 8.2 | 10.0 | 0.0914 | 2025-07-14 |
CVE-2025-34300 UPD | 8.0 | 0.0 | 0.8262 | 2025-07-16 |
CVE-2025-59340 UPD | 7.7 | 9.8 | 0.0211 | 2025-09-17 |
CVE-2025-14700 | 7.7 | 9.9 | 0.0656 | 2025-12-17 |
CVE-2026-73299 UPD | 7.7 | 10.0 | 0.0178 | 2026-08-12 |
CVE-2026-21450 | 7.6 | 9.8 | 0.0137 | 2026-01-02 |
CVE-2026-48323 | 7.6 | 10.0 | 0.0137 | 2026-08-03 |
CVE-2025-23211 UPD | 7.5 | 9.9 | 0.0356 | 2025-01-28 |
CVE-2026-21448 | 7.5 | 9.8 | 0.0092 | 2026-01-02 |
CVE-2026-25526 UPD | 7.5 | 9.8 | 0.0100 | 2026-02-04 |
CVE-2026-27641 | 7.5 | 9.8 | 0.0127 | 2026-02-25 |
CVE-2026-44181 UPD | 7.5 | 10.0 | 0.0077 | 2026-07-16 |
CVE-2026-66613 | 7.5 | 9.8 | 0.0086 | 2026-08-19 |
CVE-2026-52889 UPD | 7.5 | 9.8 | 0.0127 | 2026-08-19 |
CVE-2026-97359 | 7.5 | 10.0 | 0.0078 | 2026-09-24 |
CVE-2026-103849 | 7.5 | 10.0 | 0.0078 | 2026-10-13 |
CVE-2024-55660 UPD | 7.4 | 9.8 | 0.0062 | 2024-12-12 |