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: 04 July 2026 00:28 UTC
Cumulative inbound coverage
How completely the frameworks we cross-walk collectively cover this — the verdict is the strongest single mapping (overlapping partials are not summed); breadth shows the corroboration behind it.
Collective: full · 4 mapping(s) from 3 framework(s): ASVS 5.0 2 (full) · OWASP-Web 1 (full) · ATT&CK 1 (full)
NIST 800-53 r5 controls that address this weakness (0)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
MITRE ATT&CK techniques this weakness enables
Our own two-way CWE↔ATT&CK cross-walk — a direct mapping with no public source (the CWE→CAPEC→ATT&CK chain leaves most top weaknesses, incl. XSS and SQLi, mapped to nothing). Drafted by Grok and spot-checked by Claude Opus 4.8.
Direction: ← other covers this;
→ this covers other (F/M/P = full / mostly /
partial).
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2024-4040 KEV | 10.0 | 9.8 | 0.9954 | 2024-04-22 |
CVE-2024-23692 KEV | 10.0 | 9.8 | 0.9949 | 2024-05-31 |
CVE-2022-25813 | 8.0 | 7.5 | 0.6726 | 2022-09-02 |
CVE-2024-32651 | 8.0 | 10.0 | 0.8372 | 2024-04-26 |
CVE-2025-47916 UPD | 8.0 | 10.0 | 0.7917 | 2025-05-16 |
CVE-2023-29297 | 7.0 | 9.1 | 0.0122 | 2023-06-15 |
CVE-2024-24724 UPD | 7.0 | 9.8 | 0.2609 | 2024-04-03 |
CVE-2024-6386 | 7.0 | 9.9 | 0.2501 | 2024-08-21 |
CVE-2024-45053 | 7.0 | 9.1 | 0.0134 | 2024-09-04 |
CVE-2024-55660 | 7.0 | 9.8 | 0.0059 | 2024-12-12 |
CVE-2024-12583 | 7.0 | 9.9 | 0.0137 | 2025-01-04 |
CVE-2025-23211 | 7.0 | 9.9 | 0.0346 | 2025-01-28 |
CVE-2025-32461 | 7.0 | 9.9 | 0.0078 | 2025-04-09 |
CVE-2025-46661 UPD | 7.0 | 10.0 | 0.0065 | 2025-04-28 |
CVE-2025-49136 UPD | 7.0 | 9.0 | 0.0091 | 2025-06-09 |
CVE-2025-53833 UPD | 7.0 | 10.0 | 0.0936 | 2025-07-14 |
CVE-2025-53909 UPD | 7.0 | 9.1 | 0.0046 | 2025-07-17 |
CVE-2025-52122 UPD | 7.0 | 9.8 | 0.0057 | 2025-08-27 |
CVE-2025-59340 | 7.0 | 9.8 | 0.0232 | 2025-09-17 |
CVE-2025-37729 | 7.0 | 9.1 | 0.0056 | 2025-10-13 |
CVE-2025-60355 | 7.0 | 9.8 | 0.0047 | 2025-10-28 |
CVE-2025-65602 | 7.0 | 9.8 | 0.0045 | 2025-12-10 |
CVE-2025-14700 | 7.0 | 9.9 | 0.0600 | 2025-12-17 |
CVE-2022-23851 | 7.0 | 9.8 | 0.0043 | 2025-12-17 |
CVE-2025-68929 | 7.0 | 9.0 | 0.0042 | 2025-12-29 |