Cyber Resilience

CWE · MITRE source

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

Abstraction: Base · CVEs in our corpus: 180

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)

See the full cumulative-coverage rollup →

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 KEV10.09.80.99542024-04-22
CVE-2024-23692 KEV10.09.80.99492024-05-31
CVE-2022-258138.07.50.67262022-09-02
CVE-2024-326518.010.00.83722024-04-26
CVE-2025-47916 UPD8.010.00.79172025-05-16
CVE-2023-292977.09.10.01222023-06-15
CVE-2024-24724 UPD7.09.80.26092024-04-03
CVE-2024-63867.09.90.25012024-08-21
CVE-2024-450537.09.10.01342024-09-04
CVE-2024-556607.09.80.00592024-12-12
CVE-2024-125837.09.90.01372025-01-04
CVE-2025-232117.09.90.03462025-01-28
CVE-2025-324617.09.90.00782025-04-09
CVE-2025-46661 UPD7.010.00.00652025-04-28
CVE-2025-49136 UPD7.09.00.00912025-06-09
CVE-2025-53833 UPD7.010.00.09362025-07-14
CVE-2025-53909 UPD7.09.10.00462025-07-17
CVE-2025-52122 UPD7.09.80.00572025-08-27
CVE-2025-593407.09.80.02322025-09-17
CVE-2025-377297.09.10.00562025-10-13
CVE-2025-603557.09.80.00472025-10-28
CVE-2025-656027.09.80.00452025-12-10
CVE-2025-147007.09.90.06002025-12-17
CVE-2022-238517.09.80.00432025-12-17
CVE-2025-689297.09.00.00422025-12-29