{"id":"CVE-2026-40477","published":"2026-04-17T21:53:47Z","modified":"2026-08-17T12:04:57Z","title":"Improper restriction of the scope of accessible objects in Thymeleaf expressions","vendor":"thymeleaf","product":"thymeleaf","tier":"core","eol":null,"affectedVersions":[{"vendor":"thymeleaf","product":"thymeleaf","versions":["< 3.1.4.RELEASE"]},{"vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring5","versions":["< 3.1.4.RELEASE"]},{"vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring6","versions":["< 3.1.4.RELEASE"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-04-21T00:00:00+00:00","from":"CISA ADP","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"Thymeleaf, the Java server-side template engine, has an improper restriction of accessible objects in its expression execution mechanisms, affecting versions 3.1.3.RELEASE and prior. The flaw lets specific potentially sensitive objects be reached from within a template, despite the library's expression-injection protections. An unauthenticated remote attacker can exploit it to achieve Server-Side Template Injection when the application passes unvalidated user input directly to the template engine, with the attack complexity rated high.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:31:55Z"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00866,"percentile":0.59552,"date":"2026-11-20","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2026-10-10","exploitedFirstSeen":"2026-10-10","ransomware":false,"evidence":[{"url":"https://euvd.enisa.europa.eu/vulnerability/CVE-2026-40477","date":"2026-10-10"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":2,"pulses":[{"name":"Known_Cve | Apr 26, 2026","url":"https://otx.alienvault.com/pulse/69ece1c766d687ee21cf62ab","created":"2026-04-25"},{"name":"Known_Cve | Apr 25, 2026","url":"https://otx.alienvault.com/pulse/69eb90c7628bfe372d1727ed","created":"2026-04-24"}],"provenance":"machine"},"cwes":[{"id":"CWE-917","name":"Improper Neutralization of Special Elements used in an Expression Language Statement"},{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-r4v4-5mwr-2fwr","tags":["x_refsource_CONFIRM"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40477","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2459344","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40477.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:21772","tags":["vendor-advisory","x_refsource_REDHAT"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"from":["GHSA-r4v4-5mwr-2fwr"],"provenance":"source"},{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"from":["GHSA-r4v4-5mwr-2fwr"],"provenance":"source"},{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"from":["GHSA-r4v4-5mwr-2fwr"],"provenance":"source"}],"advisories":[{"id":"GHSA-r4v4-5mwr-2fwr","url":"https://github.com/advisories/GHSA-r4v4-5mwr-2fwr","severity":"CRITICAL","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"provenance":"source","from":"GHSA"},{"id":"GHSA-r4v4-5mwr-2fwr","url":"https://github.com/advisories/GHSA-r4v4-5mwr-2fwr","severity":"CRITICAL","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"provenance":"source","from":"GHSA"},{"id":"GHSA-r4v4-5mwr-2fwr","url":"https://github.com/advisories/GHSA-r4v4-5mwr-2fwr","severity":"CRITICAL","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2026-23571","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-23571","exploited":true,"exploitedSince":"2026-10-10","provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-09-04","earliestUrl":"https://github.com/xiaoqiMikko/thymeleaf-check","repos":[{"name":"xiaoqiMikko/thymeleaf-check","url":"https://github.com/xiaoqiMikko/thymeleaf-check","stars":0,"created":"2026-09-04"}]},"first":{"date":"2026-09-04","source":"PoC-in-GitHub","url":"https://github.com/xiaoqiMikko/thymeleaf-check"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2026-04-17","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2026-40477","provenance":"source"},{"date":"2026-09-04","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/xiaoqiMikko/thymeleaf-check","provenance":"source"},{"date":"2026-10-10","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://euvd.enisa.europa.eu/vulnerability/CVE-2026-40477","provenance":"source"},{"date":"2026-10-10","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-23571","provenance":"source"}],"speed":{"daysToPublicExploit":140,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":69.4,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":10.0,"detail":"added 42 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":11.91,"detail":"percentile 0.5955"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 PoC-in-GitHub repo"},{"name":"Mentioned in OTX pulses","points":1.08,"detail":"2 pulses"},{"name":"CVSS severity","points":6.37,"detail":"base score 9.1"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}