CVE-2026-40478

CVE-2026-40478 is a critical-severity vulnerability in Thymeleaf with a CVSS 3.x base score of 9.0. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-917.

Key facts

Description

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.

Frequently asked questions

What is CVE-2026-40478?
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.
How severe is CVE-2026-40478?
CVE-2026-40478 has a CVSS 3.x base score of 9.0, rated critical severity. It is exploitable over network with high attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2026-40478 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (51st percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2026-40478?
CVE-2026-40478 affects Thymeleaf. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2026-40478?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
Does CVE-2026-40478 have an EU (EUVD) identifier?
Yes. CVE-2026-40478 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-23573.
When was CVE-2026-40478 published?
CVE-2026-40478 was published on 2026-04-17 and last updated on 2026-06-30.

References

Affected products (1)

More vulnerabilities in Thymeleaf

All CVEs affecting Thymeleaf →

Other CWE-917 vulnerabilities

Browse all CWE-917 vulnerabilities →