CVE-2026-41901
CriticalSummary
Thymeleaf, a Java template engine, has a security bypass vulnerability prior to version 3.1.5.RELEASE that allows for the execution of dangerous expressions. If an application developer passes unsanitized variables containing such expressions to the template engine, these expressions can be executed in sandboxed contexts, leading to Server-Side Template Injection (SSTI).
Risk Assessment
Organizations using Thymeleaf versions prior to 3.1.5.RELEASE are at risk of attacks that could lead to unauthorized code execution on the server. This may result in data exposure or compromise of the application.
Recommendation
It is recommended to upgrade Thymeleaf to version 3.1.5.RELEASE or later to mitigate this vulnerability. Additionally, appropriate input sanitization mechanisms should be implemented for data passed to the template engine.
Other vulnerabilities in Thymeleaf
See all- CVE-2026-40478Critical
Thymeleaf versions up to 3.1.3.RELEASE contain a security bypass vulnerability in the expression execution mechanism. Although the library provides protections against expression injection, it fails to properly neutralize specific syntax patterns, allowing unauthorized expression execution. An unauthenticated remote attacker can exploit this to achieve Server-Side Template Injection (SSTI) if the application passes unvalidated user input directly to the template engine.
- CVE-2026-40477Critical
Thymeleaf versions up to 3.1.3.RELEASE contain a security bypass vulnerability in the expression execution mechanisms. Although the library provides protection against expression injection, it fails to properly restrict the scope of accessible objects, allowing sensitive objects to be reached from within a template.
Original NVD description (English source)
Thymeleaf is a server-side Java template engine for web and standalone environments. Prior to 3.1.5.RELEASE, a security bypass vulnerability exists in the expression execution mechanisms of Thymeleaf. 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). This vulnerability is fixed in 3.1.5.RELEASE.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

