CVE-2026-40478
published critical CVSS 3.1 · 9.1Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf
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 | Unaffected | Not required | 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 the expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly neutralize specific syntax patterns that allow for the execution of unauthorized expressions. 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 this vulnerability by providing unvalidated user input to the template engine. This bypasses existing security mechanisms, allowing for the execution of unauthorized expressions and leading to Server-Side Template Injection (SSTI).
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: 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 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-40478
- RHBZ#2459349 https://bugzilla.redhat.com/show_bug.cgi?id=2459349
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.json
Provider assertions
3GitHub_M · cna
Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf
redhat-SADP · adp
thymeleaf: Thymeleaf: Server-Side Template Injection via expression execution bypass
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 43492e354053b66eb18df7e7a8a323737e202277e9fc7c36f70c69e79601bfff
- Ingested
- 23 Sep 2026, 09:13:21 UTC
- Source record
- Official CVE record