Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.thymeleaf/thymeleaf-spring5
  4. ›
  5. CVE-2026-40477

CVE-2026-40477: Improper restriction of the scope of accessible objects in Thymeleaf expressions

April 15, 2026 (updated April 24, 2026)

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

References

  • github.com/advisories/GHSA-r4v4-5mwr-2fwr
  • github.com/thymeleaf/thymeleaf
  • github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr
  • nvd.nist.gov/vuln/detail/CVE-2026-40477

Code Behaviors & Features

Detect and mitigate CVE-2026-40477 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.4.RELEASE

Fixed versions

  • 3.1.4.RELEASE

Solution

Upgrade to version 3.1.4.RELEASE or above.

Impact 9 CRITICAL

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
  • CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')

Source file

maven/org.thymeleaf/thymeleaf-spring5/CVE-2026-40477.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:57 +0000.