CVE-2026-40477
published critical CVSS 3.1 · 9.1Improper restriction of the scope of accessible objects in Thymeleaf expressions
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| thymeleaf | — | thymeleaf< 3.1.4.RELEASE | Affected | Not stated | GitHub_M |
| thymeleaf | — | org.thymeleaf:thymeleaf-spring5< 3.1.4.RELEASE | Affected | Not stated | GitHub_M |
| thymeleaf | — | org.thymeleaf:thymeleaf-spring6< 3.1.4.RELEASE | Affected | Not stated | GitHub_M |
| Red Hat | — | devspaces/openvsx-rhel9Red Hat OpenShift Dev Spaces 3.28 · 1779528224 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | devspaces/pluginregistry-rhel9Red Hat OpenShift Dev Spaces 3.28 · 1779359423 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | camel-thymeleafRed Hat build of Apache Camel for Spring Boot 4 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleafRed Hat build of Apache Camel for Spring Boot 4 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleafRed Hat Fuse 7 | Affected | Not stated | redhat-SADP |
Show 16 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Red Hat | — | smallrye-mutiny-vertx-web-templ-thymeleafRed Hat JBoss Enterprise Application Platform 7 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleafRed Hat JBoss Enterprise Application Platform 7 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | vertx-web-templ-thymeleafRed Hat JBoss Enterprise Application Platform 7 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | smallrye-mutiny-vertx-web-templ-thymeleafRed Hat JBoss Enterprise Application Platform 8 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleafRed Hat JBoss Enterprise Application Platform 8 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | vertx-web-templ-thymeleafRed Hat JBoss Enterprise Application Platform 8 | Unaffected | Not required | redhat-SADP |
| Red Hat | — | smallrye-mutiny-vertx-web-templ-thymeleafRed Hat JBoss Enterprise Application Platform Expansion Pack | Affected | Not stated | redhat-SADP |
| Red Hat | — | spring-boot-starter-thymeleafRed Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleafRed Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleaf-extras-java8timeRed Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | thymeleaf-spring5Red Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | vertx-web-templ-thymeleafRed Hat JBoss Enterprise Application Platform Expansion Pack | Unaffected | Not required | redhat-SADP |
| Red Hat | — | spring-boot-starter-thymeleafRed Hat Single Sign-On 7 | Affected | Not stated | redhat-SADP |
| Red Hat | — | thymeleafRed Hat Single Sign-On 7 | Affected | Not stated | redhat-SADP |
| Red Hat | — | thymeleaf-extras-java8timeRed Hat Single Sign-On 7 | Affected | Not stated | redhat-SADP |
| Red Hat | — | thymeleaf-spring5Red Hat Single Sign-On 7 | Affected | Not stated | redhat-SADP |
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.
A flaw was found in Thymeleaf, a server-side Java template engine. An unauthenticated remote attacker can exploit a security bypass vulnerability in the expression execution mechanisms. By providing unvalidated user input directly to the template engine, the attacker can bypass the library's protections, leading to Server-Side Template Injection (SSTI). This allows access to potentially sensitive objects from within a template.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.1 / 10
- Severity
- critical
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.5 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| thymeleaf | thymeleaf | < 3.1.4.RELEASE (affected) | GitHub_M · cna |
| thymeleaf | org.thymeleaf:thymeleaf-spring5 | < 3.1.4.RELEASE (affected) | GitHub_M · cna |
| thymeleaf | org.thymeleaf:thymeleaf-spring6 | < 3.1.4.RELEASE (affected) | GitHub_M · cna |
| Red Hat | Red Hat OpenShift Dev Spaces 3.28 | 1779528224 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift Dev Spaces 3.28 | 1779359423 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat build of Apache Camel for Spring Boot 4 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat build of Apache Camel for Spring Boot 4 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Fuse 7 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 7 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 7 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 7 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform 8 | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat JBoss Enterprise Application Platform Expansion Pack | Default: unaffected | redhat-SADP · adp |
| Red Hat | Red Hat Single Sign-On 7 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Single Sign-On 7 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Single Sign-On 7 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Single Sign-On 7 | Default: affected | redhat-SADP · adp |
Weaknesses
3- CWE-917 CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
- CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
References
5- https://access.redhat.com/errata/RHSA-2026:21772
- https://access.redhat.com/security/cve/CVE-2026-40477
- RHBZ#2459344 https://bugzilla.redhat.com/show_bug.cgi?id=2459344
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json
Provider assertions
3GitHub_M · cna
Improper restriction of the scope of accessible objects in Thymeleaf expressions
redhat-SADP · adp
thymeleaf: Thymeleaf: Server-Side Template Injection via security bypass in expression execution
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 989c392925aba1c00501aff04f6b24af33538a0d42b6310de570cf05d48b13d9
- Ingested
- 23 Sep 2026, 09:13:21 UTC
- Source record
- Official CVE record