CVE-2026-41901: Thymeleaf Sandboxed Thymeleaf Expressions Vulnerable To Vulnerability
CRITICALCVE-2026-41901 is a CRITICAL (CVSS 9.0) sandboxed thymeleaf expressions vulnerable to vulnerability (CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')) affecting Thymeleaf libraries in the Maven ecosystem. The issue involves sandboxed thymeleaf expressions vulnerable to improper recognition of unauthorized syntax patterns. Remediation is available by upgrading affected packages to version 3.1.5.RELEASE.
CVE-2026-41901 at a Glance
Security Impact
CVSS: 9.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-41901
To remediate this vulnerability, upgrade all affected Thymeleaf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.1.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
<version>3.1.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring6</artifactId>
<version>3.1.5.RELEASE</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.thymeleaf
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-41901, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.thymeleaf
Analyze the terminal output to locate any version of Thymeleaf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.5.RELEASE), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.thymeleaf command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection'), where the product constructs all or part of an expression language (el) statement in a framework such as a java server page (jsp) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended el statement before it is executed. In Thymeleaf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-41901 Affected Thymeleaf Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.thymeleaf:thymeleaf
|
Maven |
< 3.1.5.RELEASE
|
3.1.5.RELEASE
|
|
org.thymeleaf:thymeleaf-spring5
|
Maven |
< 3.1.5.RELEASE
|
3.1.5.RELEASE
|
|
org.thymeleaf:thymeleaf-spring6
|
Maven |
< 3.1.5.RELEASE
|
3.1.5.RELEASE
|
References
Frequently Asked Questions
What is CVE-2026-41901?
Which Thymeleaf versions are affected?
What version fixes CVE-2026-41901?
Is thymeleaf affected?
Is thymeleaf-spring5 affected?
What is the CVSS score of CVE-2026-41901?
What CWE is associated with CVE-2026-41901?
How can I check Maven dependencies for CVE-2026-41901?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c9ph-gxww-7744",
"modified" : "2026-05-13T16:43:36Z",
"published" : "2026-05-04T21:15:20Z",
"aliases" : [ "CVE-2026-41901" ],
"summary" : "Sandboxed Thymeleaf expressions vulnerable to improper recognition of unauthorized syntax patterns",
"details" : "### Impact\n\nA security bypass vulnerability exists in the expression execution mechanisms of Thymeleaf up to and including 3.1.4.RELEASE. Although the library provides mechanisms to avoid the execution of potentially dangerous expressions in some specific sandboxed (restricted) contexts, it fails to properly neutralize specific constructs that allow this kind of expressions to be executed. If an application developer passes to the template engine unsanitized variables that contain such expressions, and these values are used in sandboxed contexts inside the templates, these expressions can be executed achieving Server-Side Template Injection (SSTI).\n\n### Patches\n\nThis has been fixed in Thymeleaf 3.1.5.RELEASE. All users are advised to upgrade immediately.\n\n### Workarounds\n\nNo workaround is available beyond ensuring applications do not pass unvalidated/unsanitized data directly to the template engine. Upgrading to 3.1.5.RELEASE is strongly recommended in any case.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.thymeleaf:thymeleaf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.5.RELEASE"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.4.RELEASE"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.thymeleaf:thymeleaf-spring5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.5.RELEASE"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.4.RELEASE"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.thymeleaf:thymeleaf-spring6"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.5.RELEASE"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.4.RELEASE"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-c9ph-gxww-7744"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41901"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/thymeleaf/thymeleaf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336", "CWE-917" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-04T21:15:20Z",
"nvd_published_at" : "2026-05-12T23:16:17Z"
}
}