CVE-2026-40477
CVE-2026-40477 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
- Severity: Critical (CVSS 3.x base score 9.0)
- EPSS exploit prediction: 1% (54th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-23571
- Weakness: CWE-917
- Affected product: Thymeleaf
- Published:
- Last modified:
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 expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly restrict the scope of accessible objects, allowing specific potentially sensitive objects to be reached from within a template. 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-40477?
- 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 expression execution mechanisms. Although the library provides mechanisms to prevent expression injection, it fails to properly restrict the scope of accessible objects, allowing specific potentially sensitive objects to be reached from within a template. 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-40477?
- CVE-2026-40477 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-40477 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (54th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-40477?
- CVE-2026-40477 affects Thymeleaf. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-40477?
- 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-40477 have an EU (EUVD) identifier?
- Yes. CVE-2026-40477 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-23571.
- When was CVE-2026-40477 published?
- CVE-2026-40477 was published on 2026-04-17 and last updated on 2026-06-30.
References
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr
- https://access.redhat.com/errata/RHSA-2026:21772
- https://access.redhat.com/security/cve/CVE-2026-40477
- https://bugzilla.redhat.com/show_bug.cgi?id=2459344
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json
Affected products (1)
- cpe:2.3:a:thymeleaf:thymeleaf:*:*:*:*:*:*:*:*
More vulnerabilities in Thymeleaf
- CVE-2021-43466 — Critical (CVSS 9.8): In the thymeleaf-spring5:3.0.12 component, thymeleaf combined with specific scenarios in template injection may lead to…
- CVE-2026-40478 — Critical (CVSS 9.0): Thymeleaf is a server-side Java template engine for web and standalone environments. Versions 3.1.3.RELEASE and prior…
- CVE-2023-38286 — High (CVSS 7.5): Thymeleaf through 3.1.1.RELEASE, as used in spring-boot-admin (aka Spring Boot Admin) through 3.1.1 and other products,…
All CVEs affecting Thymeleaf →
Other CWE-917 vulnerabilities
- CVE-2025-3322 — Critical (CVSS 10.0): An improper neutralization of inputs used in expression language allows remote code execution with the highest…
- CVE-2022-22947 — Critical (CVSS 10.0): In spring cloud gateway versions prior to 3.1.1+ and 3.0.7+ , applications are vulnerable to a code injection attack…
- CVE-2026-11561 — Critical (CVSS 9.8): Improper neutralization of special elements used in an expression language statement ('expression language injection')…
- CVE-2026-22738 — Critical (CVSS 9.8): In Spring AI, a SpEL injection vulnerability exists in SimpleVectorStore when a user-supplied value is used as a…
- CVE-2026-24713 — Critical (CVSS 9.8): Improper Input Validation vulnerability in Apache IoTDB. This issue affects Apache IoTDB: from 1.0.0 before 1.3.7,…
- CVE-2023-51593 — Critical (CVSS 9.8): Voltronic Power ViewPower Pro Expression Language Injection Remote Code Execution Vulnerability. This vulnerability…