Home / thymeleaf / thymeleaf / CVE-2026-40477
CVE-2026-40477: is it exploited, and which versions of thymeleaf are affected and fixed?
CVE-2026-40477 is an improper Neutralization of Special Elements used in an Expression Language Statement vulnerability in thymeleaf. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 10:38 UTC). Affected: org.thymeleaf:thymeleaf before 3.1.4.RELEASE, org.thymeleaf:thymeleaf-spring5 before 3.1.4.RELEASE and org.thymeleaf:thymeleaf-spring6 before 3.1.4.RELEASE (GitHub advisory GHSA-r4v4-5mwr-2fwr). Fixed in 3.1.4.RELEASE (GitHub advisory GHSA-r4v4-5mwr-2fwr). Severity: Critical (9.1, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:38 UTC, CVE record November 19, 2026, 07:07 UTC and NVD November 19, 2026, 07:12 UTC.
What is CVE-2026-40477?
Improper restriction of the scope of accessible objects in Thymeleaf expressions
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.
From the CVE record by GitHub_M, last updated August 17, 2026, 12:04 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| thymeleaf | thymeleaf | < 3.1.4.RELEASE | |
| thymeleaf | org.thymeleaf:thymeleaf-spring5 | < 3.1.4.RELEASE | |
| thymeleaf | org.thymeleaf:thymeleaf-spring6 | < 3.1.4.RELEASE |
As the CVE record by GitHub_M states it, last updated August 17, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Maven | org.thymeleaf:thymeleaf | < 3.1.4.RELEASE | 3.1.4.RELEASE | GHSA-r4v4-5mwr-2fwr |
| Maven | org.thymeleaf:thymeleaf-spring5 | < 3.1.4.RELEASE | 3.1.4.RELEASE | GHSA-r4v4-5mwr-2fwr |
| Maven | org.thymeleaf:thymeleaf-spring6 | < 3.1.4.RELEASE | 3.1.4.RELEASE | GHSA-r4v4-5mwr-2fwr |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated April 24, 2026. Summary: Improper restriction of the scope of accessible objects in Thymeleaf expressions.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| thymeleaf | thymeleaf | before 3.1.4 | application |
NVD analysis (status Modified), last modified October 26, 2026, 22:10 UTC.
How severe is CVE-2026-40477?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H | GitHub_M |
| High 8.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H | redhat-SADP |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2026-40477 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, April 21, 2026)
- EPSS
- 0.87% probability of exploitation activity in the next 30 days, percentile 59.8 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement
- CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine
Where are the vendor advisories and references?
- https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr x_refsource_CONFIRM
- https://access.redhat.com/security/cve/CVE-2026-40477 vdb-entry, x_refsource_REDHAT
- RHBZ#2459344 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json x_sadp-csaf-vex
- https://access.redhat.com/errata/RHSA-2026:21772 vendor-advisory, x_refsource_REDHAT
When was it published, and where is the official record?
- Reserved
- April 13, 2026
- Published
- April 17, 2026, 21:53 UTC
- CVE record updated
- August 17, 2026, 12:04 UTC by GitHub_M
- NVD
- Modified, last modified October 26, 2026, 22:10 UTC
- Last checked
- CVE list November 19, 2026, 07:07 UTC; NVD November 19, 2026, 07:12 UTC; KEV December 3, 2026, 10:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect thymeleaf?
- Nov 24, 2026CVE-2026-136410 thymeleaf: improper Neutralization of Special Elements used in an Expression Language Statement
- May 12, 2026CVE-2026-41901 thymeleaf: improper Neutralization of Special Elements used in an Expression Language Statement
- Apr 17, 2026CVE-2026-40478 thymeleaf: improper Neutralization of Special Elements used in an Expression Language Statement
- Jul 14, 2023CVE-2023-38286 Codecentric Spring Boot Admin: command injection
- Nov 9, 2021CVE-2021-43466 Thymeleaf: code injection (remote code execution)
Questions about CVE-2026-40477
Is CVE-2026-40477 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 10:38 UTC. FIRST's EPSS gives it a 0.87% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of thymeleaf are affected by CVE-2026-40477?
org.thymeleaf:thymeleaf before 3.1.4.RELEASE, org.thymeleaf:thymeleaf-spring5 before 3.1.4.RELEASE and org.thymeleaf:thymeleaf-spring6 before 3.1.4.RELEASE, per the GitHub advisory GHSA-r4v4-5mwr-2fwr. The tables above give every range the sources list.
Which version fixes CVE-2026-40477?
3.1.4.RELEASE, per the GitHub advisory GHSA-r4v4-5mwr-2fwr. Check the vendor's advisory before you rely on it.
How severe is CVE-2026-40477?
Critical (9.1, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2026-40477?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.