Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HSummary
CVE-2026-40478 is a critical-severity Expression Language Injection (CWE-917) vulnerability in Thymeleaf Thymeleaf. Its CVSS base score is 9.0 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Template Injection (T1221); ranked in the top 48% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
Thymeleaf, a server-side Java template engine for web and standalone environments, is affected by CVE-2026-40478 in versions 3.1.3.RELEASE and prior. The vulnerability is a security bypass in the expression execution mechanisms, where the library fails to properly neutralize specific syntax patterns despite providing protections against expression injection. This allows unauthorized expressions to execute, enabling Server-Side Template Injection (SSTI) when applications pass unvalidated user input directly to the template engine. The issue is rated at CVSS 9.0 (AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H) and maps to CWE-917 and CWE-1336.
An unauthenticated remote attacker can exploit this vulnerability over the network with high attack complexity and no privileges or user interaction required. Exploitation requires an application developer to pass unvalidated user input to the Thymeleaf template engine, at which point the attacker can bypass the library's protections to achieve SSTI. Successful exploitation grants high confidentiality, integrity, and availability impacts with a changed scope, potentially leading to full server compromise.
The Thymeleaf security advisory at https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79 details the fix in version 3.1.4.RELEASE, recommending that users upgrade to this or later versions to mitigate the vulnerability. Practitioners should review applications using Thymeleaf for direct user input handling in templates and validate inputs rigorously as an interim measure.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-23573
Vulnerability Data
Thymeleaf is a server-side Java template engine for web and standalone environments. Versions 3.1.3.RELEASE and prior contain a security bypass vulnerability in the the expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly…
more
neutralize specific syntax patterns that allow for the execution of unauthorized expressions. If an application developer passes unvalidated user input directly to the template engine, an unauthenticated remote attacker can bypass the library's protections to achieve Server-Side Template Injection (SSTI). This issue has ben fixed in version 3.1.4.RELEASE.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V1.3.2V1.3.7V1.3.10V1.1.2
Mitigating Controls (NIST 800-53 r5) AI
Developer testing and static analysis can discover missing neutralization of template directives.
Input validation directly requires checking and neutralizing special elements in externally influenced data before it is used to build executable statements such as EL expressions.
Security engineering principles include requirements for safe construction and sanitization of dynamic statements, structurally preventing expression-language injection at design time.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly require input neutralization and safe EL construction to prevent injection flaws.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing in development and acceptance can detect EL injection but does not itself implement the fix.
Secure SDLC mandates input validation and output encoding that directly prevent expression-language injection.
Application security requirements explicitly call for controls against injection flaws including EL injection.
Secure architecture principles reduce the attack surface but do not prescribe the specific neutralization techniques needed.
Secure coding standards require proper escaping and parameterization of expression-language statements.