Improper restriction of the scope of accessible objects in Thymeleaf expressions
Published Apr 17, 2026
9.1
CRITICALCVSS 3.1
EPSS 0.94%
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.
Affected products
-
Affected
- < 3.1.4.RELEASE
-
Affected
- < 3.1.4.RELEASE
-
Affected
- < 3.1.4.RELEASE
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
| Vendor | Product | Default status | Versions |
|---|---|---|---|
| Thymeleaf | Org.thymeleaf:thymeleaf-Spring5 | unknown | Affected
|
| Thymeleaf | Org.thymeleaf:thymeleaf-Spring6 | unknown | Affected
|
| Thymeleaf | Thymeleaf | unknown | Affected
|
No data.
Red Hat OpenShift Dev Spaces 3.28
devspaces/openvsx-rhel9:1779528224
Fixed · RHSA-2026:21772
Red Hat OpenShift Dev Spaces 3.28
devspaces/pluginregistry-rhel9:1779359423
Fixed · RHSA-2026:21772
Red Hat Fuse 7
thymeleaf
Will not fix
Red Hat JBoss Enterprise Application Platform 7
smallrye-mutiny-vertx-web-templ-thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform 7
thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform 7
vertx-web-templ-thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform 8
smallrye-mutiny-vertx-web-templ-thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform 8
thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform 8
vertx-web-templ-thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform Expansion Pack
smallrye-mutiny-vertx-web-templ-thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform Expansion Pack
spring-boot-starter-thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform Expansion Pack
thymeleaf
Not affected
Red Hat JBoss Enterprise Application Platform Expansion Pack
thymeleaf-extras-java8time
Not affected
Red Hat JBoss Enterprise Application Platform Expansion Pack
thymeleaf-spring5
Not affected
Red Hat JBoss Enterprise Application Platform Expansion Pack
vertx-web-templ-thymeleaf
Not affected
Red Hat Single Sign-On 7
spring-boot-starter-thymeleaf
Will not fix
Red Hat Single Sign-On 7
thymeleaf
Will not fix
Red Hat Single Sign-On 7
thymeleaf-extras-java8time
Will not fix
Red Hat Single Sign-On 7
thymeleaf-spring5
Will not fix
Red Hat build of Apache Camel for Spring Boot 4
camel-thymeleaf
Not affected
Red Hat build of Apache Camel for Spring Boot 4
thymeleaf
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat OpenShift Dev Spaces 3.28 | devspaces/openvsx-rhel9:1779528224 | Fixed | RHSA-2026:21772 |
| Red Hat OpenShift Dev Spaces 3.28 | devspaces/pluginregistry-rhel9:1779359423 | Fixed | RHSA-2026:21772 |
| Red Hat Fuse 7 | thymeleaf | Will not fix | n/a |
| Red Hat JBoss Enterprise Application Platform 7 | smallrye-mutiny-vertx-web-templ-thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform 7 | thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform 7 | vertx-web-templ-thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform 8 | smallrye-mutiny-vertx-web-templ-thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform 8 | thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform 8 | vertx-web-templ-thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | smallrye-mutiny-vertx-web-templ-thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | spring-boot-starter-thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | thymeleaf | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | thymeleaf-extras-java8time | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | thymeleaf-spring5 | Not affected | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | vertx-web-templ-thymeleaf | Not affected | n/a |
| Red Hat Single Sign-On 7 | spring-boot-starter-thymeleaf | Will not fix | n/a |
| Red Hat Single Sign-On 7 | thymeleaf | Will not fix | n/a |
| Red Hat Single Sign-On 7 | thymeleaf-extras-java8time | Will not fix | n/a |
| Red Hat Single Sign-On 7 | thymeleaf-spring5 | Will not fix | n/a |
| Red Hat build of Apache Camel for Spring Boot 4 | camel-thymeleaf | Not affected | n/a |
| Red Hat build of Apache Camel for Spring Boot 4 | thymeleaf | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
References (9)
- https://access.redhat.com/errata/RHSA-2026:21772
- https://access.redhat.com/security/cve/CVE-2026-40477 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2459344 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-23571 Advisory
- https://github.com/advisories/GHSA-r4v4-5mwr-2fwr Advisory
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr x_refsource_CONFIRMVendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-40477
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json
- https://www.cve.org/CVERecord?id=CVE-2026-40477
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
GitHub