CVE-2026-40477Improper restriction of the scope of accessible objects in Thymeleaf expressions
- 9.1CriticalCVSS base score
- 0.85%Exploitation in 30 daysEPSS · top 41% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Exploited in the wild (ENISA)
Only ENISA's EU KEV lists it. Across the site, “known exploited” (the KEV badge, the filter, the feeds and exports) means CISA's KEV, so it does not count as one there.
ENISA's EU Vulnerability Database lists it as exploited, from ENISA's EU KEV, since 10 Oct 2026.
Timeline
ID reserved
By GitHub_M
- 4 days later
· 4 days later
Published
- 4 months later
· 4 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Critical9.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
| redhat-SADPADP (enrichment) | 3.1 | High8.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | Critical9.0 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.85% · top 41% of all CVEs (12 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.1.
Affected products
- affected < 3.1.4.RELEASE
thymeleaf · org.thymeleaf:thymeleaf-spring5
- affected < 3.1.4.RELEASE
thymeleaf · org.thymeleaf:thymeleaf-spring6
- affected < 3.1.4.RELEASE
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.thymeleaf:thymeleafGHSA-r4v4-5mwr-2fwr (opens in a new tab)
- Mavenorg.thymeleaf:thymeleaf-spring5GHSA-r4v4-5mwr-2fwr (opens in a new tab)
- Mavenorg.thymeleaf:thymeleaf-spring6GHSA-r4v4-5mwr-2fwr (opens in a new tab)
References
References5
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr (opens in a new tab)x_refsource_CONFIRM
- https://access.redhat.com/security/cve/CVE-2026-40477 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2459344 (opens in a new tab)issue-trackingx_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json (opens in a new tab)x_sadp-csaf-vex
- https://access.redhat.com/errata/RHSA-2026:21772 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2026-23571 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-r4v4-5mwr-2fwr (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2026-40477)Record last updated .