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

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.12%, higher than 67% of CVEs (2026-12-01)
- Published: 2026-04-15T19:46:23.000Z
- Modified: 2026-10-26T21:10:00.170Z
- Also known as: GHSA-xjw8-8c5c-9r79
- Weaknesses: CWE-917, CWE-1336
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- thymeleaf thymeleaf: < 3.1.4.RELEASE; before 3.1.4
- thymeleaf org.thymeleaf:thymeleaf-spring5: < 3.1.4.RELEASE
- thymeleaf org.thymeleaf:thymeleaf-spring6: < 3.1.4.RELEASE
- devspaces/openvsx-rhel9: no versions given (not affected: from 1779528224 before *)
- devspaces/pluginregistry-rhel9: no versions given (not affected: from 1779359423 before *)
- camel-thymeleaf: no versions given
- thymeleaf: no versions given
- smallrye-mutiny-vertx-web-templ-thymeleaf: no versions given
- vertx-web-templ-thymeleaf: no versions given
- spring-boot-starter-thymeleaf: no versions given
- thymeleaf-extras-java8time: no versions given
- thymeleaf-spring5: no versions given
- org.thymeleaf:thymeleaf (Maven): before 3.1.4.RELEASE
- org.thymeleaf:thymeleaf-spring5 (Maven): before 3.1.4.RELEASE
- org.thymeleaf:thymeleaf-spring6 (Maven): before 3.1.4.RELEASE

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `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 High `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 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79> (vendor-advisory, web)
- <https://access.redhat.com/security/cve/CVE-2026-40478> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2459349> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.json>
- <https://access.redhat.com/errata/RHSA-2026:21772> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40478> (advisory)
- <https://github.com/thymeleaf/thymeleaf> (package)

## Sources

- CVE List: [CVE-2026-40478](https://www.cve.org/CVERecord?id=CVE-2026-40478), CVE Terms of Use, modified 2026-08-18
- GitHub Advisory Database: [GHSA-xjw8-8c5c-9r79](https://github.com/advisories/GHSA-xjw8-8c5c-9r79), CC-BY-4.0, modified 2026-05-05
- NVD: [CVE-2026-40478](https://nvd.nist.gov/vuln/detail/CVE-2026-40478), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40478 · Whole record: https://cve.day/CVE-2026-40478.json · Rebuilt by cve.day 2026-11-25T22:59:18.976Z
