Security Digest · Vulnerability record
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.
CVSS 9.1 Critical EPSS 1.2% · p68
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 1.2%, percentile 68: FIRST’s model estimates a 1.2% chance of exploitation activity in the next 30 days, higher than 68% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
org.thymeleaf:thymeleaf(Maven) <= 3.1.3.RELEASE, fixed in 3.1.4.RELEASE;org.thymeleaf:thymeleaf-spring5(Maven) <= 3.1.3.RELEASE, fixed in 3.1.4.RELEASE;org.thymeleaf:thymeleaf-spring6(Maven) <= 3.1.3.RELEASE, fixed in 3.1.4.RELEASE. Check your lockfile, including transitive dependencies.
What it is
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.
From the GitHub advisory
Impact A security bypass vulnerability exists in the expression execution mechanisms of Thymeleaf up to and including 3.1.3.RELEASE. 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).
Patches This has been fixed in Thymeleaf 3.1.4.RELEASE.
Workarounds No workaround is available beyond ensuring applications do not pass unvalidated user input directly to the template engine. Upgrading to 3.1.4.RELEASE is strongly recommended in any case.
Credits Thanks to Dawid Bakaj (VIPentest.com) for responsible disclosure.
Weakness type: CWE-917, CWE-1336.
Product: org.thymeleaf:thymeleaf (Maven) · Assigned by: GitHub_M · Published: 2026-04-17
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| Maven | org.thymeleaf:thymeleaf | <= 3.1.3.RELEASE | 3.1.4.RELEASE |
| Maven | org.thymeleaf:thymeleaf-spring5 | <= 3.1.3.RELEASE | 3.1.4.RELEASE |
| Maven | org.thymeleaf:thymeleaf-spring6 | <= 3.1.3.RELEASE | 3.1.4.RELEASE |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| thymeleaf | thymeleaf | < 3.1.4.RELEASE |
| thymeleaf | org.thymeleaf:thymeleaf-spring5 | < 3.1.4.RELEASE |
| thymeleaf | org.thymeleaf:thymeleaf-spring6 | < 3.1.4.RELEASE |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.1 Critical | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
| redhat-SADP | 3.1 | 8.5 High | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 3.1 | 9.0 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
- Attack vector: network (remotely reachable)
- Attack complexity: high (needs special conditions)
- Privileges required: none (no login)
- User interaction: none
- Scope: changed (can affect other components)
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable no, technical impact total.
- FIRST EPSS (model of 2026-10-21): 1.20% probability of exploitation activity in the next 30 days; percentile 68.
Timeline
- — GitHub-reviewed advisory GHSA-xjw8-8c5c-9r79 published (critical)
- — CVE record published by GitHub_M
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vendor and project advisories, patches
- access.redhat.com access.redhat.com
Vulnerability records
- GitHub Advisory GHSA-xjw8-8c5c-9r79 github.com
- CVE.org record CVE-2026-40478 cve.org
- NVD entry CVE-2026-40478 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- access.redhat.com access.redhat.com
- RHBZ#2459349 bugzilla.redhat.com
- security.access.redhat.com security.access.redhat.com