NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Maven

CVE-2026-41901: Sandboxed Thymeleaf expressions vulnerable to improper recognition of unauthorized syntax patterns

criticalCVSS 3.1 9.0GHSA-c9ph-gxww-7744

Impact A 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.

Published May 4, 2026 · Updated May 13, 2026

Affected packages

org.thymeleaf:thymeleaf

Ecosystem
Maven
Affected
<= 3.1.4.RELEASE
Fixed in
3.1.5.RELEASE
Check
mvn dependency:tree -Dincludes=org.thymeleaf:thymeleaf

org.thymeleaf:thymeleaf-spring5

Ecosystem
Maven
Affected
<= 3.1.4.RELEASE
Fixed in
3.1.5.RELEASE
Check
mvn dependency:tree -Dincludes=org.thymeleaf:thymeleaf-spring5

org.thymeleaf:thymeleaf-spring6

Ecosystem
Maven
Affected
<= 3.1.4.RELEASE
Fixed in
3.1.5.RELEASE
Check
mvn dependency:tree -Dincludes=org.thymeleaf:thymeleaf-spring6

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

A 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).

Patches

This has been fixed in Thymeleaf 3.1.5.RELEASE. All users are advised to upgrade immediately.

Workarounds

No 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.

Credited to cristianstaicu.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Maven vulnerabilities

All Maven entries