The Thymeleaf project, a cornerstone for Java developers building modern server-side web applications, has issued a critical security fix for a high-severity sandbox bypass vulnerability. Tracked as CVE-2026-41901 with a CVSS score of 9.0, the flaw targets the expression execution engine, potentially allowing an attacker to achieve Server-Side Template Injection (SSTI).
Thymeleaf was designed with built-in security mechanisms to restrict the execution of dangerous expressions within specific “sandboxed” or restricted contexts. However, researchers discovered a significant gap in these defenses.
The core issue lies in the “improper recognition of unauthorized syntax patterns”. Essentially, the template engine fails to properly neutralize specific code constructs, allowing malicious expressions to slip past the sandbox filters and execute on the server.
The vulnerability is triggered when a developer passes unsanitized variables directly to the template engine. If those variables contain specially crafted malicious expressions and are used within a sandboxed context, the sandbox is bypassed.
Potential Impact:
- Arbitrary Code Execution: Through SSTI, an attacker can often execute malicious code in the context of the server process.
- Data Exfiltration: Unauthorized access to internal system variables and sensitive data.
- Total System Compromise: Depending on the server configuration, an successful SSTI attack can lead to a full takeover of the application host.
The Thymeleaf team states there is no functional workaround beyond the general best practice of ensuring applications never pass unvalidated or unsanitized data directly to the engine. All users are strongly advised to upgrade to 3.1.5.RELEASE immediately to close this sandbox escape.
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.