PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-40477 thymeleaf CVE debrief

CVE-2026-40477 is a critical security bypass vulnerability in Thymeleaf, a server-side Java template engine. Versions 3.1.3.RELEASE and prior are affected, with a CVSS score of 9. The vulnerability allows an unauthenticated remote attacker to bypass the library's protections to achieve Server-Side Template Injection (SSTI) if an application developer passes unvalidated user input directly to the template engine. This issue has been fixed in version 3.1.4.RELEASE. The vulnerability was published on April 17, 2026, and modified on June 30, 2026.

Vendor
thymeleaf
Product
Unknown
CVSS
CRITICAL 9
CISA KEV
Not listed in stored evidence
Original CVE published
2026-04-17
Original CVE updated
2026-07-15
Advisory published
2026-04-17
Advisory updated
2026-07-15

Who should care

Developers and administrators using Thymeleaf versions 3.1.3.RELEASE and prior should be concerned about this vulnerability. If an application passes unvalidated user input to the template engine, an unauthenticated remote attacker could exploit this vulnerability to achieve SSTI. Users of Red Hat products may also be affected, as indicated by Red Hat's errata and security advisories.

Technical summary

Thymeleaf, a server-side Java template engine, contains a security bypass vulnerability in its 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. This vulnerability, CVE-2026-40477, has a CVSS score of 9 and is classified as CRITICAL. An unauthenticated remote attacker can exploit this vulnerability to achieve Server-Side Template Injection (SSTI) if an application developer passes unvalidated user input directly to the template engine. The vulnerability is addressed in version 3.1.4.RELEASE.

Defensive priority

This vulnerability has a high defensive priority due to its critical CVSS score and potential impact. Affected users should prioritize upgrading to version 3.1.4.RELEASE or applying mitigations as soon as possible.

Recommended defensive actions

  • Upgrade to Thymeleaf version 3.1.4.RELEASE or later.
  • Validate and sanitize user input before passing it to the template engine.
  • Implement additional security measures to detect and prevent SSTI attacks.
  • Review application code to ensure secure usage of Thymeleaf.
  • Monitor for and respond to potential exploitation attempts.

Evidence notes

The CVE-2026-40477 vulnerability was published on April 17, 2026, and modified on June 30, 2026. The vulnerability affects Thymeleaf versions 3.1.3.RELEASE and prior. Red Hat has provided errata and security advisories related to this vulnerability, indicating potential impact on Red Hat products. The CVSS score is 9, indicating a critical severity.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-40477 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-40477

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-40477 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-40477

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Mitigation or vendor reference

    Unverified legacy reference

    URL: https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr

    [email protected] - Vendor Advisory

  • Source reference

    Unverified legacy reference

    URL: https://access.redhat.com/errata/RHSA-2026:21772

    0b0ca135-0b70-47e7-9f44-1890c2a1c46c

  • Source reference

    Unverified legacy reference

    URL: https://access.redhat.com/security/cve/CVE-2026-40477

    0b0ca135-0b70-47e7-9f44-1890c2a1c46c

  • Source reference

    Unverified legacy reference

    URL: https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json

    0b0ca135-0b70-47e7-9f44-1890c2a1c46c

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.