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

CVE-2026-40478: Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf

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

References

  • github.com/advisories/GHSA-xjw8-8c5c-9r79
  • github.com/thymeleaf/thymeleaf
  • github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79
  • nvd.nist.gov/vuln/detail/CVE-2026-40478

Code Behaviors & Features

Detect and mitigate CVE-2026-40478 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-40478.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:07 +0000.