CVE-2026-40477 in the critical feed json
Improper restriction of the scope of accessible objects in Thymeleaf expressions
published 6mo ago modified 14d ago also EUVD-2026-23571 , GHSA-r4v4-5mwr-2fwr
- cvss
- 9.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 58%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- maven org.thymeleaf:thymeleaf 3.1.4.RELEASE
- maven org.thymeleaf:thymeleaf-spring5 3.1.4.RELEASE
- maven org.thymeleaf:thymeleaf-spring6 3.1.4.RELEASE
- Red Hat Red Hat OpenShift Dev Spaces 3.28 1779359423, 1779528224
Is CVE-2026-40477 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-40477 updated cvss 8.5
thymeleaf: Thymeleaf: Server-Side Template Injection via security bypass in expression execution
-
Red Hat Fuse 7 thymeleaf Red Hat Single Sign-On 7 thymeleaf, thymeleaf-spring5, thymeleaf-extras-java8time, spring-boot-starter-thymeleafaffected: workaround, no fix planned “Will not fix”
-
Red Hat OpenShift Dev Spaces 3.28 devspaces/openvsx-rhel9 1779528224, devspaces/pluginregistry-rhel9 1779359423fixed: vendor fix RHSA-2026:21772
-
Red Hat build of Apache Camel for Spring Boot 4 thymeleaf, camel-thymeleafnot affected: vulnerable code not in execute path
-
Red Hat JBoss Enterprise Application Platform 7 thymeleaf, vertx-web-templ-thymeleaf, smallrye-mutiny-vertx-web-templ-thymeleaf Red Hat JBoss Enterprise Application Platform 8 thymeleaf, vertx-web-templ-thymeleaf, smallrye-mutiny-vertx-web-templ-thymeleaf Red Hat JBoss Enterprise Application Platform Expansion Pack thymeleaf, thymeleaf-spring5, vertx-web-templ-thymeleaf, thymeleaf-extras-java8time, spring-boot-starter-thymeleaf, smallrye-mutiny-vertx-web-templ-thymeleaf Red Hat OpenShift Dev Spaces 3.28 devspaces/udi-rhel9 1779829736, devspaces/code-rhel9 1779814592, devspaces/server-rhel9 1779342423, devspaces/traefik-rhel9 1779786779, devspaces/udi-base-rhel9 1779741066, devspaces/code-sshd-rhel9 1779813519, +8 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 6mo ago
Exploit prediction
0.85% chance of exploitation in the next 30 days, higher than 58% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
| CISA ADP | 3.1 | 8.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 3.1 | 9.0 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
| CNA | 3.1 | 8.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.thymeleaf:thymeleaf | <3.1.4.RELEASE |
3.1.4.RELEASE |
| maven | org.thymeleaf:thymeleaf-spring5 | <3.1.4.RELEASE |
3.1.4.RELEASE |
| maven | org.thymeleaf:thymeleaf-spring6 | <3.1.4.RELEASE |
3.1.4.RELEASE |
Affected products
- thymeleaf thymeleaf
- thymeleaf org.thymeleaf:thymeleaf-spring5
- thymeleaf org.thymeleaf:thymeleaf-spring6
- Red Hat Red Hat OpenShift Dev Spaces 3.28
- Red Hat Red Hat build of Apache Camel for Spring Boot 4
- Red Hat Red Hat Fuse 7
- Red Hat Red Hat JBoss Enterprise Application Platform 7
- Red Hat Red Hat JBoss Enterprise Application Platform 8
- Red Hat Red Hat JBoss Enterprise Application Platform Expansion Pack
- Red Hat Red Hat Single Sign-On 7
Classification
- Weakness
- Technology feeds
References
-
access.redhat.com
/errata/RHSA-2026:21772
vendor-advisory
-
github.com
/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr
web, vendor-advisory
-
access.redhat.com
/security/cve/CVE-2026-40477
vdb-entry
-
bugzilla.redhat.com
/show_bug.cgi?id=2459344
issue-tracking
- security.access.redhat.com /data/csaf/v2/vex/2026/cve-2026-40477.json
-
nvd.nist.gov
/vuln/detail/CVE-2026-40477
advisory
-
github.com
/thymeleaf/thymeleaf
package
Sources
- CVE List CVE-2026-40477
- GitHub Advisory GHSA-r4v4-5mwr-2fwr
- NVD CVE-2026-40477
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.