# CVE-2026-41901: Thymeleaf sandbox bypass and server-side template injection

Source: https://junglewise.ai/threats/cve-2026-41901-thymeleaf-ssti-sandbox-bypass-in-expression-execution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-12. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-41901 · Severity: critical · CVSS 9 · Published 2026-05-12

Thymeleaf is a popular Java-based tool used by web applications to generate dynamic content. A security flaw in how it handles user-provided data allows attackers to bypass built-in safety restrictions and execute unauthorized commands on the server. This could lead to a complete system takeover, theft of sensitive data, or disruption of services.

Technologies: [org.thymeleaf:thymeleaf (Maven)](https://junglewise.ai/threats/technologies/org-thymeleaf-thymeleaf), [org.thymeleaf:thymeleaf-spring5 (Maven)](https://junglewise.ai/threats/technologies/org-thymeleaf-thymeleaf-spring5), [org.thymeleaf:thymeleaf-spring6 (Maven)](https://junglewise.ai/threats/technologies/org-thymeleaf-thymeleaf-spring6), [Thymeleaf](https://junglewise.ai/threats/technologies/thymeleaf), [Thymeleaf-Spring5](https://junglewise.ai/threats/technologies/thymeleaf-spring5), [Thymeleaf-Spring6](https://junglewise.ai/threats/technologies/thymeleaf-spring6). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [Thymeleaf](https://junglewise.ai/threats/vendors/thymeleaf).

## Quick answers

**Is CVE-2026-41901 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41901 being exploited in the wild.

**How severe is CVE-2026-41901?** Critical severity, with a CVSS score of 9, published 12 May 2026.

**Which products and versions are affected?** org.thymeleaf:thymeleaf (Maven) <= 3.1.4.RELEASE, ECOSYSTEM:introduced=0,fixed=3.1.5.RELEASE; org.thymeleaf:thymeleaf-spring5 (Maven) <= 3.1.4.RELEASE, ECOSYSTEM:introduced=0,fixed=3.1.5.RELEASE; org.thymeleaf:thymeleaf-spring6 (Maven) <= 3.1.4.RELEASE, ECOSYSTEM:introduced=0,fixed=3.1.5.RELEASE; Thymeleaf <= 3.1.4.RELEASE; and 2 more.

**Is there a fix for CVE-2026-41901?** Yes. org.thymeleaf:thymeleaf (Maven): upgrade to 3.1.5.RELEASE or later; org.thymeleaf:thymeleaf-spring5 (Maven): upgrade to 3.1.5.RELEASE or later; org.thymeleaf:thymeleaf-spring6 (Maven): upgrade to 3.1.5.RELEASE or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-41901 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-41901?** Check whether you run org.thymeleaf:thymeleaf (Maven), org.thymeleaf:thymeleaf-spring5 (Maven), org.thymeleaf:thymeleaf-spring6 (Maven) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.thymeleaf:thymeleaf (Maven): upgrade to 3.1.5.RELEASE or later

  ```sh
  # set org.thymeleaf:thymeleaf to 3.1.5.RELEASE in your pom.xml or build.gradle
  ```

- org.thymeleaf:thymeleaf-spring5 (Maven): upgrade to 3.1.5.RELEASE or later

  ```sh
  # set org.thymeleaf:thymeleaf-spring5 to 3.1.5.RELEASE in your pom.xml or build.gradle
  ```

- org.thymeleaf:thymeleaf-spring6 (Maven): upgrade to 3.1.5.RELEASE or later

  ```sh
  # set org.thymeleaf:thymeleaf-spring6 to 3.1.5.RELEASE in your pom.xml or build.gradle
  ```


## Technical details

A Server-Side Template Injection (SSTI) vulnerability exists in Thymeleaf's expression execution engine due to improper neutralization of specific syntax patterns. While Thymeleaf implements a sandbox to restrict dangerous expressions, certain constructs can bypass these protections if unsanitized user input is passed into sandboxed template contexts. An attacker can exploit this by submitting specially crafted expressions that the engine fails to recognize as unauthorized, leading to arbitrary code execution on the host. The vulnerability is present in versions up to 3.1.4.RELEASE and is fixed in 3.1.5.RELEASE. Exploitation requires the application to pass unvalidated variables into a template context where they are subsequently evaluated.

## Affected products

- Thymeleaf Thymeleaf <= 3.1.4.RELEASE
- Thymeleaf thymeleaf-spring5 <= 3.1.4.RELEASE
- Thymeleaf thymeleaf-spring6 <= 3.1.4.RELEASE

## Identifiers

- CVE-2026-41901
- GHSA-c9ph-gxww-7744

## Timeline

- 2026-04-29: advisory: GitHub Security Advisory published by maintainers
- 2026-05-12: disclosed: CVE published to NVD
- 2026-05-12: patched: Fixed in version 3.1.5.RELEASE

## References

- [https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-c9ph-gxww-7744](https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-c9ph-gxww-7744)

## Related threats

- [Thymeleaf expression execution bypass leading to SSTI](https://junglewise.ai/threats/cve-2026-40478-thymeleaf-expression-execution-bypass-leading-to-ssti)
- [Thymeleaf security bypass in expression execution mechanisms](https://junglewise.ai/threats/cve-2026-40477-thymeleaf-security-bypass-in-expression-execution-mechanisms)
- [Template injection in thymeleaf-spring5](https://junglewise.ai/threats/cve-2021-43466-template-injection-in-thymeleaf-spring5)
