Skip to content
OpenAdvisories
Critical · 9.0 Exploited (EU) Public exploit CVE-2026-41901 EUVD-2026-29872GHSA-c9ph-gxww-7744

Thymeleaf: Improper recognition of unauthorized syntax patterns in sandboxed Thymeleaf expressions

Published May 12, 2026 · Updated May 13, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
thymeleaf thymeleaf < 3.1.5.RELEASE —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.thymeleaf:thymeleaf < 3.1.5.RELEASE 3.1.5.RELEASE GHSA-c9ph-gxww-7744
Maven org.thymeleaf:thymeleaf-spring5 < 3.1.5.RELEASE 3.1.5.RELEASE GHSA-c9ph-gxww-7744
Maven org.thymeleaf:thymeleaf-spring6 < 3.1.5.RELEASE 3.1.5.RELEASE GHSA-c9ph-gxww-7744

References