CVE-2026-41901

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

State
Published
Severity
9.0 Critical
Published
May 12, 2026
Updated
May 13, 2026
Reserved
Apr 22, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.19.0 CriticalCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HGitHub_M

Weaknesses

  • CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
  • CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine

Affected Products

ProductVersions
thymeleafthymeleaf
  • < 3.1.5.RELEASEAffected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.