Threat Feed

CVE-2026-41901: Thymeleaf: Improper recognition of unauthorized syntax patterns in sandboxed Thymeleaf expressions

Exploitation: In the wild · CVSS 9.0 Critical · Unauthenticated · Published 2026-05-12

Description

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.

Enclave's analysis

Thymeleaf before 3.1.5.RELEASE has a sandbox bypass. Expressions the library should block in restricted contexts can still run, giving server-side template injection. An attacker needs the app to pass unsanitized, attacker-influenced values into those sandboxed contexts. No exploitation or public exploit is recorded, and it isn't on the KEV list. Upgrade to 3.1.5.RELEASE, and stop feeding untrusted input into template expressions. The advisory itself couldn't be retrieved.

Fix

No fixed version in the CVE record yet. Follow the vendor advisory.

Affected versions

ProductVulnerableFixed in
thymeleaf< 3.1.5.RELEASENot listed

Seen in 2 sources