Thymeleaf
Thymeleaf: Improper recognition of unauthorized syntax patterns in sandboxed Thymeleaf expressions
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- < 3.1.5.RELEASE
Fixed in 3.1.5.RELEASE
Mitigation
Upgrade thymeleaf to 3.1.5.RELEASE or later.
References
- Vendor advisory github.com/thymeleaf/thymeleaf/security/adviso…
Timeline
Days relative to CVE publicationFirst public PoC 10 days after publication; not in CISA KEV. First PoC: HORKimhab/CVE-2026-41901 (created 23 May 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs · 1 informational
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| HORKimhab/CVE-2026-41901 | 23 May 2026 +10 d | 0 | PoC |
Informational 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| xiaoqiMikko/thymeleaf-check | 4 Sep 2026 +114 d | 0 | Informational · detection |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /
- Body markers
input={var})inapplication/x-www-form-urlencoded- Ports
- 8080
- Seen in
- 1 repo: HORKimhab/CVE-2026-41901
- Evidence
- HORKimhab/CVE-2026-41901/exploit-cve-2026-41901.sh:17
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-41901 thymeleaf thymeleaf exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.request_body; content:"input="; reference:url,poc.griffinguard.io/cve/CVE-2026-41901; classtype:web-application-attack; sid:9159899; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: thymeleaf thymeleaf exploit attempt (CVE-2026-41901)
id: gg-pocmon-cve-2026-41901-9159899
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-41901. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-41901
logsource:
category: webserver
detection:
selection:
cs-method: POST
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.41901