---
title: "CVE-2026-40478: Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf"
url: https://erroneo.us/security/cve/CVE-2026-40478/
description: "CVE-2026-40478 (org.thymeleaf:thymeleaf (Maven)): Thymeleaf is a server-side Java template engine for web and standalone environments. Versions…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-04-17
date_modified: 2026-08-18
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-40478"
kev: false
cvss: 9.1
epss: 0.01204
license: All rights reserved. Quote with attribution and a link.
---

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

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 1.2% , percentile 68: FIRST’s model estimates a 1.2% chance of exploitation activity in the next 30 days, higher than 68% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes org.thymeleaf:thymeleaf (Maven) <= 3.1.3.RELEASE, fixed in 3.1.4.RELEASE ; org.thymeleaf:thymeleaf-spring5 (Maven) <= 3.1.3.RELEASE, fixed in 3.1.4.RELEASE ; org.thymeleaf:thymeleaf-spring6 (Maven) <= 3.1.3.RELEASE, fixed in 3.1.4.RELEASE . Check your lockfile, including transitive dependencies.

## What it is

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 packages

- Maven `org.thymeleaf:thymeleaf` <= 3.1.3.RELEASE → fixed: 3.1.4.RELEASE
- Maven `org.thymeleaf:thymeleaf-spring5` <= 3.1.3.RELEASE → fixed: 3.1.4.RELEASE
- Maven `org.thymeleaf:thymeleaf-spring6` <= 3.1.3.RELEASE → fixed: 3.1.4.RELEASE

## Affected products (CVE record)

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

## Severity

- GitHub_M CVSS 3.1: 9.1 `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- redhat-SADP CVSS 3.1: 8.5 `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.0 `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 1.20% probability of exploitation activity in the next 30 days; percentile 68.

## Sources

- [access.redhat.com](https://access.redhat.com/errata/RHSA-2026:21772)
- [GitHub Advisory GHSA-xjw8-8c5c-9r79](https://github.com/advisories/GHSA-xjw8-8c5c-9r79)
- [CVE.org record CVE-2026-40478](https://www.cve.org/CVERecord?id=CVE-2026-40478)
- [NVD entry CVE-2026-40478](https://nvd.nist.gov/vuln/detail/CVE-2026-40478)
- [github.com](https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79)
- [access.redhat.com](https://access.redhat.com/security/cve/CVE-2026-40478)
- [RHBZ#2459349](https://bugzilla.redhat.com/show_bug.cgi?id=2459349)
- [security.access.redhat.com](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.json)

---
Source page: https://erroneo.us/security/cve/CVE-2026-40478/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
