CVE-2026-40477 Thymeleaf
| Affected software | Thymeleaf |
|---|---|
| Severity | 9.0 Critical CVSS 3.1 2 scores |
| Fixed in | 3.1.4.RELEASE |
| Weakness | Expression language injection (CWE-917) |
| Published | 17 Apr 2026 |
| Updated | 26 Oct 2026 |
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 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.
CWE-1336
Exploitation status
No public exploit
No exploit has been reported in the sources we check. The 1 repository below are public GitHub repositories with fewer than 5 stars.
Exploitation status
- CISA KEV not listed
- VulnCheck KEV not listed
- CISA Vulnrichment exploitation: none
- Indexed PoC 1 indexed, none at 5+ stars
- EPSS 0.85% chance in 30 days
| Index | Artifact | Stars | First seen |
|---|---|---|---|
| GitHub PoC | Offline checker for Thymeleaf CVE-2026-40477 / CVE-2026-41901 — tells you which of the two CVSS 9.0 SSTI flaws you are exposed to, and whether your version line has a fix at all (3.0.x: it does not) | 2026-09-04 |
Waratek protection
Within Waratek scope. In the sources we check, nobody has published exploit code for this CVE or reported it being exploited.
A public code fix exists.
- Protection none
- Action unverified
- Review automated Upstream data
- Record active
| Decided by | Exploit code for this candidate, published in a reviewed catalogue or a GitHub repository with 5 or more stars, or in use per CISA or VulnCheck; not only a CISA verdict, a forecast, or nothing at all |
|---|---|
| Finding | This CVE is not listed in CISA KEV or VulnCheck KEV, CISA Vulnrichment records no active exploitation, no reviewed exploit catalogue carries an entry for it, and no GitHub PoC repository for it has 5 or more stars. Nobody has published exploit code worth tracing, so it is not a candidate for a rule ahead of the ones where somebody has; an upstream fix path does exist, so the remediation half of the candidacy still holds. This is a statement about what has been published, not about whether the defect is reachable or serious. |
| Candidate fix | https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr : the maintainers' own security advisory: names the version that fixes it, so the fix is the difference between two releases |
CVSS
9.0 CRITICAL
v3.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
2 metrics
CVSS
9.0 CRITICAL v3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
2 metrics
We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.
| Version | Score | Band | Vector | Assigner | Type | |
|---|---|---|---|---|---|---|
| CVSS 3.1 | 9.0 | CRITICAL | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
security-advisories@github.com | Secondary | published |
| CVSS 3.1 | 8.5 | HIGH | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
redhat-SADP | Secondary |
Affected software and releases
Maven packages
Affected and fixed versions, from OSV.dev| Package | Introduced | Fixed | Last affected |
|---|---|---|---|
org.thymeleaf:thymeleaf |
0 | 3.1.4.RELEASE |
unbounded |
org.thymeleaf:thymeleaf-spring5 |
0 | 3.1.4.RELEASE |
unbounded |
org.thymeleaf:thymeleaf-spring6 |
0 | 3.1.4.RELEASE |
unbounded |
Products and versions
4 products, 4 version entries| Source | Vendor | Product | Scheme | Affected versions |
|---|---|---|---|---|
| osv | org.thymeleaf | thymeleaf | generic | < 3.1.4 |
| osv | org.thymeleaf | thymeleaf-spring5 | generic | < 3.1.4 |
| osv | org.thymeleaf | thymeleaf-spring6 | generic | < 3.1.4 |
| nvd | thymeleaf | thymeleaf | generic | < 3.1.4 |
References
Timeline
Timeline
| Published | 2026-04-17 | By the CVE Program. |
|---|---|---|
| NVD record modified | 2026-10-26 | NVD's own last-modified date for this record. |