CVE-2026-40478 | 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.

Published: 2026-04-17 Last update: 2026-04-24 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-40478 is rated Moderate Risk (41.6/100): CVSS Critical severity, with low exploitation likelihood (EPSS 0.05%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2026-40478

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-23 0.04% 0.05% +0.01%
2 2026-04-21 0.13% 0.04% -0.09%
3 2026-04-18 0.13%

Full EPSS history (3 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-40478

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.0 3.1 CRITICAL
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.2 6.0 [email protected]

Weakness enumeration for CVE-2026-40478

GitHub Security Advisory for CVE-2026-40478

GHSA-xjw8-8c5c-9r79 · Severity: critical · Ecosystem: maven — Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf

Affected software / configurations for CVE-2026-40478

Vendor Product Version Raw CPE
thymeleaf thymeleaf < 3.1.4 cpe:2.3:a:thymeleaf:thymeleaf:*:*:*:*:*:*:*:*

References for CVE-2026-40478

cvelogic Threat Intelligence