Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-40478

CRITICAL 9.1EPSS 69%

Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf

Also known as GHSA-xjw8-8c5c-9r79

Mitigation

  • Upgrade org.thymeleaf:thymeleaf to 3.1.4.RELEASE or later.
  • Upgrade org.thymeleaf:thymeleaf-spring5 to 3.1.4.RELEASE or later.
  • Upgrade org.thymeleaf:thymeleaf-spring6 to 3.1.4.RELEASE or later.

Who should check

  • Projects that depend on Maven package org.thymeleaf:thymeleaf (< 3.1.4.RELEASE)
  • Projects that depend on Maven package org.thymeleaf:thymeleaf-spring5 (< 3.1.4.RELEASE)
  • Projects that depend on Maven package org.thymeleaf:thymeleaf-spring6 (< 3.1.4.RELEASE)
  • Anyone running thymeleaf < 3.1.4.RELEASE
  • Anyone running org.thymeleaf:thymeleaf-spring5 < 3.1.4.RELEASE
  • Anyone running org.thymeleaf:thymeleaf-spring6 < 3.1.4.RELEASE

Vulnerability facts

Affected
org.thymeleaf:thymeleaf < 3.1.4.RELEASE; org.thymeleaf:thymeleaf-spring5 < 3.1.4.RELEASE; org.thymeleaf:thymeleaf-spring6 < 3.1.4.RELEASE
Fixed in
3.1.4.RELEASE
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
9.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: None
  • User interaction: None
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
1.25% chance of exploitation in 30 days (percentile 69, 2026-11-26)
CWE
CWE-917, CWE-1336
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
Maven org.thymeleaf:thymeleaf< 3.1.4.RELEASE3.1.4.RELEASEosv
Maven org.thymeleaf:thymeleaf-spring5< 3.1.4.RELEASE3.1.4.RELEASEosv
Maven org.thymeleaf:thymeleaf-spring6< 3.1.4.RELEASE3.1.4.RELEASEosv
thymeleaf< 3.1.4.RELEASE—cvelist
org.thymeleaf:thymeleaf-spring5< 3.1.4.RELEASE—cvelist
org.thymeleaf:thymeleaf-spring6< 3.1.4.RELEASE—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-40478. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-40478.md
Affected: org.thymeleaf:thymeleaf < 3.1.4.RELEASE; org.thymeleaf:thymeleaf-spring5 < 3.1.4.RELEASE; org.thymeleaf:thymeleaf-spring6 < 3.1.4.RELEASE
Fixed in: 3.1.4.RELEASE

Steps:
1. Search this machine and project for org.thymeleaf:thymeleaf (Maven), org.thymeleaf:thymeleaf-spring5 (Maven), org.thymeleaf:thymeleaf-spring6 (Maven), thymeleaf, org.thymeleaf:thymeleaf-spring5, org.thymeleaf:thymeleaf-spring6: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-40478 being exploited?

There is no confirmed exploitation: CVE-2026-40478 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.25% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-40478?

Critical: CVSS 9.1 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2026-40478?

org.thymeleaf:thymeleaf < 3.1.4.RELEASE; org.thymeleaf:thymeleaf-spring5 < 3.1.4.RELEASE; org.thymeleaf:thymeleaf-spring6 < 3.1.4.RELEASE.

Is there a fix for CVE-2026-40478?

Yes. Fixed in 3.1.4.RELEASE. Upgrade org.thymeleaf:thymeleaf to 3.1.4.RELEASE or later. Upgrade org.thymeleaf:thymeleaf-spring5 to 3.1.4.RELEASE or later. Upgrade org.thymeleaf:thymeleaf-spring6 to 3.1.4.RELEASE or later.

How do I check if I'm affected by CVE-2026-40478?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors