Thymeleaf SSTI Bypass <3.1.4 RELEASE (Expr Exec)
CVE-2026-40478 Published on April 17, 2026
Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf
Thymeleaf is a server-side Java template engine for web and standalone environments. Versions 3.1.3.RELEASE and prior contain a security bypass vulnerability in the the expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly neutralize specific syntax patterns that allow for the execution of unauthorized expressions. If an application developer passes unvalidated user input directly to the template engine, an unauthenticated remote attacker can bypass the library's protections to achieve Server-Side Template Injection (SSTI). This issue has ben fixed in version 3.1.4.RELEASE.
Vulnerability Analysis
CVE-2026-40478 is exploitable with network access, and requires small amount of user privileges. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to be very high.
Weakness Types
What is an EL Injection Vulnerability?
The software constructs all or part of an expression language (EL) statement in a Java Server Page (JSP) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended EL statement before it is executed.
CVE-2026-40478 has been classified to as an EL Injection vulnerability or weakness.
Products Associated with CVE-2026-40478
Want to know whenever a new CVE is published for Red Hat products? stack.watch will email you.
Affected Versions
thymeleaf:- Version < 3.1.4.RELEASE is affected.
- Version < 3.1.4.RELEASE is affected.
- Version < 3.1.4.RELEASE is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.