Actively exploited vulnerability / CVE-2026-40477
Thymeleaf: a flaw can let outsiders take control of a web application
This flaw in Thymeleaf can let an attacker, without an account and from anywhere, get around the library's protections and run their own code on the server, if the application passes user input to Thymeleaf without checking it. For a business, this can mean exposure of sensitive data or loss of control over the server hosting the application. It is on the list of vulnerabilities used in real attacks kept by ENISA, the EU cybersecurity agency.
- Identifier
- CVE-2026-40477 · EUVD-2026-23571
- Severity
- Critical (9/10)
- On the ENISA list (EU)
- yes
- Probability of exploitation (EPSS)
- 1.0% (FIRST's estimate for the next 30 days)
Does it concern you?
Thymeleaf is a component developers use to build the pages of Java web applications. You may have it if your company runs a portal, online shop or custom internal application built in Java, for example with Spring.
The version is not visible in the application itself, so ask your development team or application supplier which Thymeleaf version they use. Versions 3.1.3.RELEASE and all earlier versions are affected.
Affected products and versions
- Thymeleaf
- thymeleaf: before 3.1.4
What to do
Ask your developers to update Thymeleaf to version 3.1.4.RELEASE or later and redeploy the application. Also ask them to confirm that user input never reaches page templates unchecked.
Versions that contain the fix: 3.1.4.
The official description
The text below is the description from the public database.
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 expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly restrict the scope of accessible objects, allowing specific potentially sensitive objects to be reached from within a template. 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.
Sources
Data from the public CVE and NVD databases, the CISA KEV and ENISA EU KEV lists and FIRST's EPSS score. The explanations are ours, written from that data. Last updated: 29 November 2026.