Skip to main content
No exploitation reportedFix available

CVE-2026-40478

No exploitation reported by the sources we read.

  • Published2026-04-17
  • Fixed in3.1.4
  • WeaknessCWE-1336 · CWE-917

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2026-04-1722:16CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-10-23 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2026-40478?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2026-40478?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV
Thymeleaf
BranchAffectedFixed in
3.1< 3.1.43.1.4
thymeleaf
BranchAffectedFixed in
3.1< 3.1.4.RELEASE3.1.4.RELEASE
thymeleaf-spring5
BranchAffectedFixed in
3.1< 3.1.4.RELEASE3.1.4.RELEASE

1 more product in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Vendor advisories

  • RHSA-2026:21772 Red Hat Product Security8 products fixed

    Red Hat Security Advisory: Red Hat OpenShift Dev Spaces 3.28.0 Release.

Full record on NVD

Fix

  1. Update Thymeleaf to 3.1.4
  2. Vendor fix Red Hat Product Security RHSA-2026:21772 · 8 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  3. Workaround from the vendor Red Hat Product Security RHSA-2026:21772 · 61 productsThe vulnerability arises when unvalidated user input is directly passed to the Thymeleaf template engine. To mitigate this, application developers should implement robust input validation and sanitization for all user-supplied data before it is processed by the Thymeleaf template engine. This ensur…

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
none listed
PoC-in-GitHub

Sources

  • NVDCVE recordread 2026-10-23
  • CISA-ADPSSVC decisionnone2026-04-21
  • OpenCVESSVC decisionnone—
  • CNACVSS 3.19read 2026-10-23
  • CNAweakness (CWE)CWE-1336, CWE-917read 2026-10-23
  • FIRST EPSSEPSS score1.2 %2026-10-23
  • OSVaffected packages—

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Published
2026-04-17
Last Modified
2026-08-18
NVD status
Modified

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.

Is CVE-2026-40478 actively exploited?

Active exploitation of CVE-2026-40478 has not been confirmed. Its EPSS score was 1.2% on 2026-10-23, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-40478?

CVE-2026-40478 has a CVSS v3 base score of 9 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H.

Running thymeleaf? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month