CVE-2026-40478
criticalpriority · act · 90OT risk · criticalEU KEV · CNWEPSS 0.012 · 68 %ileEURUUSEU KEVflagged by CNWreported 2026-10-10patched 2026-04-15
EPSS · scored 2026-10-22
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
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · high–critical · 8.5–9.1
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (9)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-xjw8-8c5c-9r79Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf2026-04-15ghsa · osvUS
### Impact A security bypass vulnerability exists in the expression execution mechanisms of Thymeleaf up to and including 3.1.3.RELEASE. 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). ### Patches This has been fixed in Thymeleaf 3.1.4.RELEASE. ### Workarounds No workaround is available beyond ensuring applications do not pass unvalidated user input directly to the template engine. Upgrading to 3.1.4.RELEASE is strongly recommended in any case. ### Credits Thanks to Dawid Bakaj (VIPentest.com) for responsible disclosure.
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (8)
External citations — patches, advisories, analysis.
- https://nvd.nist.gov/vuln/detail/CVE-2026-40478cnnvd
- https://www.thymeleaf.org/download.htmlPatchcnnvd
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79enisa_euvd
- https://access.redhat.com/errata/RHSA-2026:21772nvd
- https://access.redhat.com/security/cve/CVE-2026-40478nvd
- https://bugzilla.redhat.com/show_bug.cgi?id=2459349nvd
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79Vendor Advisorynvd
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.jsonnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan