Skip to main content
Public proof of conceptFix available

CVE-2026-40477

A public proof of concept exists; no exploitation attested.

  • 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 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.

Timeline

dates in UTC
  1. 2026-04-1722:16CVE publishedNVD
  2. 2026-10-2319:23First public proof of conceptPoC-in-GitHub

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-40477?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2026-40477?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 productsMitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Advisories and patches

Detection

read 2026-10-23 19:25 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
1 repository, unverifiedxiaoqiMikko/thymeleaf-check
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 score0.9 %2026-10-23
  • PoC-in-GitHubproof of concept1read 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-04
NVD status
Modified

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.

Is CVE-2026-40477 actively exploited?

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

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

CVE-2026-40477 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