CVE-2026-40478: Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf
Vulnerability summary
CVE-2026-40478 is a critical (CVSS 9.1) vulnerability in Thymeleaf. It is known to be exploited: ENISA lists it, first on 10-10-2026. EPSS estimates a 1.12% chance of exploitation in the next 30 days, higher than 67% of scored vulnerabilities.
Listed as exploited by ENISA (10-10-2026)
Source freshness unavailable
How is this decided?Timeline
- 17-04-2026PublishedVulnerability first disclosed.
- 18-08-2026Last modifiedVulnerability information updated.
- 10-10-2026Added to ENISA KEVExploitedAdded to the ENISA known exploited vulnerabilities catalog.
Description
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 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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · MavenEcosystem advisory · calculated9.0CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HDiffers
- NVDNIST9.0CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HDiffers
EPSS trend
Probability
1.12%
Chance of exploitation in the next 30 days
Percentile
67%
Versus all other CVEs
30-day change
Decrease -0.08 pp
From 1.20% on 22-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
- Added
- 10-10-2026
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-917Improper Neutralization of Special Elements used in an Expression Language StatementThe product constructs all or part of an expression language (EL) statement in a framework such as a Java Server Page (JSP) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended EL statement before it is executed.
- CWE-1336Improper Neutralization of Special Elements Used in a Template EngineThe 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.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Org.thymeleaf3 products
- thymeleaf< 3.1.4.RELEASE
- thymeleaf-spring5< 3.1.4.RELEASE
- thymeleaf-spring6< 3.1.4.RELEASE
Thymeleaf3 products
- org.thymeleaf:thymeleaf-spring5< 3.1.4.RELEASE
- org.thymeleaf:thymeleaf-spring6< 3.1.4.RELEASE
- thymeleaf< 3.1.4.RELEASE | < 3.1.4
2 vendors · 6 products
References
7 links- github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79X Refsource CONFIRMWEBVendor Advisory