Skip to content
Fencer Vulns
critical 9.1

CVE-2026-40477 in the critical feed json

Improper restriction of the scope of accessible objects in Thymeleaf expressions

published 2026-04-15 6 mo ago modified 2026-10-26 13 d ago also GHSA-r4v4-5mwr-2fwr , EUVD-2026-23571

cvss
9.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.9%
EPSS 0.9% chance of exploitation in 30 days, percentile 58%
public exploits
0
none known

Summary

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 expression execution mechanisms. 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). This issue has ben fixed in version 3.1.4.RELEASE.

Patch / fix

  • maven org.thymeleaf:thymeleaf 3.1.4.RELEASE
  • maven org.thymeleaf:thymeleaf-spring5 3.1.4.RELEASE
  • maven org.thymeleaf:thymeleaf-spring6 3.1.4.RELEASE
  • Red Hat Red Hat OpenShift Dev Spaces 3.28 1779359423, 1779528224

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-40477 updated cvss 8.5

thymeleaf: Thymeleaf: Server-Side Template Injection via security bypass in expression execution

  • Red Hat Fuse 7 thymeleaf Red Hat Single Sign-On 7 thymeleaf, thymeleaf-spring5, thymeleaf-extras-java8time, spring-boot-starter-thymeleaf
    affected: workaround, no fix planned “Will not fix”
  • Red Hat OpenShift Dev Spaces 3.28 devspaces/openvsx-rhel9 1779528224, devspaces/pluginregistry-rhel9 1779359423
    fixed: vendor fix RHSA-2026:21772
  • Red Hat build of Apache Camel for Spring Boot 4 thymeleaf, camel-thymeleaf
    not affected: vulnerable code not in execute path
  • Red Hat JBoss Enterprise Application Platform 7 thymeleaf, vertx-web-templ-thymeleaf, smallrye-mutiny-vertx-web-templ-thymeleaf Red Hat JBoss Enterprise Application Platform 8 thymeleaf, vertx-web-templ-thymeleaf, smallrye-mutiny-vertx-web-templ-thymeleaf Red Hat JBoss Enterprise Application Platform Expansion Pack thymeleaf, thymeleaf-spring5, vertx-web-templ-thymeleaf, thymeleaf-extras-java8time, spring-boot-starter-thymeleaf, smallrye-mutiny-vertx-web-templ-thymeleaf Red Hat OpenShift Dev Spaces 3.28 devspaces/udi-rhel9 1779829736, devspaces/code-rhel9 1779814592, devspaces/server-rhel9 1779342423, devspaces/traefik-rhel9 1779786779, devspaces/udi-base-rhel9 1779741066, devspaces/code-sshd-rhel9 1779813519, +8 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
6 mo ago

Exploit prediction

0.85% chance of exploitation in the next 30 days, higher than 58% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 9.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
CISA ADP 3.1 8.5 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
CNA 3.1 8.5 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub 3.1 9.0 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.thymeleaf:thymeleaf
<3.1.4.RELEASE
3.1.4.RELEASE
maven org.thymeleaf:thymeleaf-spring5
<3.1.4.RELEASE
3.1.4.RELEASE
maven org.thymeleaf:thymeleaf-spring6
<3.1.4.RELEASE
3.1.4.RELEASE

Affected products

  • thymeleaf thymeleaf
  • thymeleaf org.thymeleaf:thymeleaf-spring5
  • thymeleaf org.thymeleaf:thymeleaf-spring6
  • Red Hat Red Hat OpenShift Dev Spaces 3.28
  • Red Hat Red Hat build of Apache Camel for Spring Boot 4
  • Red Hat Red Hat Fuse 7
  • Red Hat Red Hat JBoss Enterprise Application Platform 7
  • Red Hat Red Hat JBoss Enterprise Application Platform 8
  • Red Hat Red Hat JBoss Enterprise Application Platform Expansion Pack
  • Red Hat Red Hat Single Sign-On 7

Classification

Weakness
  • CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement
  • CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.