{"id":"CVE-2026-40477","aliases":["EUVD-2026-23571","GHSA-c9ph-gxww-7744","GHSA-r4v4-5mwr-2fwr","GHSA-xjw8-8c5c-9r79","RHLW-2026-e0e5640c50ceea84"],"status":"published","title":"Improper restriction of the scope of accessible objects in Thymeleaf expressions","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 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.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00851,"percentile":0.58463,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":true,"public_exploit":true,"fix_available":true},"cwes":["CWE-1336","CWE-917"],"published":"2026-04-15T19:46:04Z","modified":"2026-11-06T19:30:03Z","exploitation":[{"source":"euvd","since":"2026-10-10"}],"exploits":[{"source":"pocgithub","id":"xiaoqiMikko/thymeleaf-check","title":"xiaoqiMikko/thymeleaf-check","date":"2026-09-04","url":"https://github.com/xiaoqiMikko/thymeleaf-check"}],"fixes":[{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","fixed_in":["3.1.4.RELEASE"],"sources":["ghsa","osv"]},{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","fixed_in":["3.1.4.RELEASE"],"sources":["ghsa","osv"]},{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","fixed_in":["3.1.4.RELEASE"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.1.3.RELEASE"},{"fixed":"3.1.4.RELEASE"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.1.3.RELEASE"},{"fixed":"3.1.4.RELEASE"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.1.3.RELEASE"},{"fixed":"3.1.4.RELEASE"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.4.RELEASE"}]}],"versions":["1.0.0","1.0.0-beta1","1.0.0-beta2","1.0.0-beta3","1.0.0-beta4","1.0.0-beta5","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","2.0.0","2.0.0-beta1","2.0.0-beta2","2.0.1","2.0.10","2.0.11","2.0.12","2.0.13","2.0.14","2.0.15","2.0.16","2.0.17","2.0.18","2.0.19","2.0.2","2.0.20","2.0.21","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.9","2.1.0-beta1","2.1.0-beta2","2.1.0-m1","2.1.0-m2","2.1.0-m3","2.1.0.RELEASE","2.1.1.RELEASE","2.1.2.RELEASE","2.1.3.RELEASE","2.1.4.RELEASE","2.1.5.RELEASE","2.1.6.RELEASE","3.0.0.ALPHA01","3.0.0.ALPHA02","3.0.0.ALPHA03","3.0.0.BETA01","3.0.0.BETA02","3.0.0.BETA03","3.0.0.RELEASE","3.0.1.RELEASE","3.0.10.RELEASE","3.0.11.RELEASE","3.0.12.RELEASE","3.0.13.RELEASE","3.0.14.RELEASE","3.0.15.RELEASE","3.0.2.RELEASE","3.0.3.RELEASE","3.0.4.RELEASE","3.0.5.RELEASE","3.0.6.RELEASE","3.0.7.RELEASE","3.0.8.RELEASE","3.0.9.RELEASE","3.1.0.M1","3.1.0.M2","3.1.0.M3","3.1.0.RC1","3.1.0.RC2","3.1.0.RELEASE","3.1.1.RELEASE","3.1.2.RELEASE","3.1.3.RELEASE","m1"]},{"source":"osv","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.4.RELEASE"}]}],"versions":["3.0.10.RELEASE","3.0.11.RELEASE","3.0.12.RELEASE","3.0.13.RELEASE","3.0.14.RELEASE","3.0.15.RELEASE","3.0.3.M1","3.0.4.M2","3.0.5.M3","3.0.6.M4","3.0.7.RC1","3.0.8.RELEASE","3.0.9.RELEASE","3.1.0.M1","3.1.0.M2","3.1.0.M3","3.1.0.RC1","3.1.0.RC2","3.1.0.RELEASE","3.1.1.RELEASE","3.1.2.RELEASE","3.1.3.RELEASE"]},{"source":"osv","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.4.RELEASE"}]}],"versions":["3.1.0.M1","3.1.0.M2","3.1.0.M3","3.1.0.RC1","3.1.0.RC2","3.1.0.RELEASE","3.1.1.RELEASE","3.1.2.RELEASE","3.1.3.RELEASE"]},{"source":"osv","ecosystem":"Red Hat Lightwell:Maven","package":"org.thymeleaf:thymeleaf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.15.RELEASE-rhlw-00009"}]}],"versions":["1.0.0","1.0.0-beta1","1.0.0-beta2","1.0.0-beta3","1.0.0-beta4","1.0.0-beta5","1.0.1","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","2.0.0","2.0.0-beta1","2.0.0-beta2","2.0.1","2.0.10","2.0.11","2.0.12","2.0.13","2.0.14","2.0.15","2.0.16","2.0.17","2.0.18","2.0.19","2.0.2","2.0.20","2.0.21","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.9","2.1.0-beta1","2.1.0-beta2","2.1.0-m1","2.1.0-m2","2.1.0-m3","2.1.0.RELEASE","2.1.1.RELEASE","2.1.2.RELEASE","2.1.3.RELEASE","2.1.4.RELEASE","2.1.5.RELEASE","2.1.6.RELEASE","3.0.0.ALPHA01","3.0.0.ALPHA02","3.0.0.ALPHA03","3.0.0.BETA01","3.0.0.BETA02","3.0.0.BETA03","3.0.0.RELEASE","3.0.1.RELEASE","3.0.10.RELEASE","3.0.11.RELEASE","3.0.12.RELEASE","3.0.13.RELEASE","3.0.14.RELEASE","3.0.15.RELEASE","3.0.2.RELEASE","3.0.3.RELEASE","3.0.4.RELEASE","3.0.5.RELEASE","3.0.6.RELEASE","3.0.7.RELEASE","3.0.8.RELEASE","3.0.9.RELEASE","m1"],"bundled":3}],"products":[{"vendor":"red hat","product":"red hat build of apache camel for spring boot 4"},{"vendor":"red hat","product":"red hat fuse 7"},{"vendor":"red hat","product":"red hat jboss enterprise application platform 7"},{"vendor":"red hat","product":"red hat jboss enterprise application platform 8"},{"vendor":"red hat","product":"red hat jboss enterprise application platform expansion pack"},{"vendor":"red hat","product":"red hat openshift dev spaces 3.28"},{"vendor":"red hat","product":"red hat single sign-on 7"},{"vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring5"},{"vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring6"},{"vendor":"thymeleaf","product":"thymeleaf"}],"references":[{"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40477","tags":["vdb-entry","x_refsource_REDHAT","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2459344","tags":["issue-tracking","x_refsource_REDHAT","report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json","tags":["x_sadp-csaf-vex","web"]},{"url":"https://access.redhat.com/errata/RHSA-2026:21772","tags":["vendor-advisory","x_refsource_REDHAT","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40477","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-r4v4-5mwr-2fwr","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40477.json","tags":["advisory"]},{"url":"https://github.com/thymeleaf/thymeleaf","tags":["package"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.json","tags":["web"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40478","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40478.json","tags":["advisory"]},{"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40478","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-xjw8-8c5c-9r79","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41901.json","tags":["advisory"]},{"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-c9ph-gxww-7744","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41901","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-c9ph-gxww-7744","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-40477","title":"Improper restriction of the scope of accessible objects in Thymeleaf expressions","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 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.","status":"published","published":"2026-04-17T21:53:47.271Z","modified":"2026-08-17T12:04:57.847Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"cna"},{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"adp"}],"cwes":["CWE-917","CWE-1336","CWE-917"],"updated_at":"2026-11-02T13:43:22.599321Z"}],"euvd":[{"id":"EUVD-2026-23571","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 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.","status":"published","published":"2026-04-17T21:53:47Z","modified":"2026-08-17T12:04:57Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"exploited_since":"2026-10-10","updated_at":"2026-11-02T18:01:49.818495Z"}],"ghsa":[{"id":"GHSA-r4v4-5mwr-2fwr","title":"Improper restriction of the scope of accessible objects in Thymeleaf expressions","description":"### Impact\nA 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 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).\n\n### Patches\nThis has been fixed in Thymeleaf 3.1.4.RELEASE.\n\n### Workarounds\nNo workaround is available beyond ensuring applications do not pass unvalidated user input directly to the template engine. Upgrading to 3.1.4.RELEASE is strongly recommended in any case.\n\n\n### Credits\nThanks to Thomas Reburn (Praetorian) for responsible disclosure.","status":"published","published":"2026-04-15T19:46:04Z","modified":"2026-04-24T20:51:37Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-917","CWE-1336"],"updated_at":"2026-11-02T14:39:57.650091Z"}],"nvd":[{"id":"CVE-2026-40477","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 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.","status":"published","published":"2026-04-17T22:16:33.5Z","modified":"2026-10-26T22:10:00.163Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"3.1","score":8.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-917","CWE-1336"],"updated_at":"2026-11-02T14:12:15.120927Z"}],"osv":[{"id":"CVE-2026-40477","title":"Improper restriction of the scope of accessible objects in Thymeleaf expressions","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 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.","status":"published","published":"2026-04-17T21:53:47.271Z","modified":"2026-10-28T02:30:39.897098998Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-1336","CWE-917"],"updated_at":"2026-11-02T15:45:03.424067Z"},{"id":"GHSA-r4v4-5mwr-2fwr","title":"Improper restriction of the scope of accessible objects in Thymeleaf expressions","description":"### Impact\nA 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 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).\n\n### Patches\nThis has been fixed in Thymeleaf 3.1.4.RELEASE.\n\n### Workarounds\nNo workaround is available beyond ensuring applications do not pass unvalidated user input directly to the template engine. Upgrading to 3.1.4.RELEASE is strongly recommended in any case.\n\n\n### Credits\nThanks to Thomas Reburn (Praetorian) for responsible disclosure.","status":"published","published":"2026-04-15T19:46:04Z","modified":"2026-05-05T16:10:40.722195Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-1336","CWE-917"],"updated_at":"2026-11-02T15:46:55.480549Z"},{"id":"RHLW-2026-e0e5640c50ceea84","title":"Lightwell Security Advisory: thymeleaf 3.0.15.RELEASE-rhlw-00009","description":"Red Hat Lightwell has released org.thymeleaf:thymeleaf 3.0.15.RELEASE-rhlw-00009 with backported fixes for CVE-2026-40477, CVE-2026-40478, and CVE-2026-41901.\n\nCVE-2026-40477: Improper restriction of the scope of accessible objects in Thymeleaf expressions\n\nCVE-2026-40478: Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf\n\nCVE-2026-41901: Thymeleaf: Improper recognition of unauthorized syntax patterns in sandboxed Thymeleaf expressions\n\nThis patched artifact is a drop-in replacement for org.thymeleaf:thymeleaf 3.0.15.RELEASE-rhlw-00009 from Maven Central.","status":"published","published":"2026-10-21T19:19:23Z","modified":"2026-11-06T19:30:03.870744546Z","cvss":[{"version":"3.1","score":9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-06T19:35:45.633414Z"}]}}
