{"id":"CVE-2026-40478","published":"2026-04-17T21:57:01Z","modified":"2026-08-18T12:05:25Z","title":"Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf","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 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.","provenance":"source","from":"CVE.org"},"summary":{"text":"Thymeleaf, the server-side Java template engine for web and standalone environments, contains a flaw in its expression execution mechanisms in versions 3.1.3.RELEASE and earlier, where specific syntax patterns are not properly neutralized, allowing unauthorized expressions to run. An unauthenticated remote attacker can exploit this when an application passes unvalidated user input directly to the template engine, bypassing the library's protections to achieve server-side template injection, with no user interaction required and a high-complexity attack.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T07:18:50Z"},"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.01122,"percentile":0.66996,"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-40478","date":"2026-10-10"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":3,"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"},{"name":"CVE Research 2026","url":"https://otx.alienvault.com/pulse/69b1e183a12a96a0f1df32cf","created":"2026-03-11"}],"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-xjw8-8c5c-9r79","tags":["x_refsource_CONFIRM"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40478","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2459349","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.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-xjw8-8c5c-9r79"],"provenance":"source"},{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"from":["GHSA-xjw8-8c5c-9r79"],"provenance":"source"},{"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"from":["GHSA-xjw8-8c5c-9r79"],"provenance":"source"}],"advisories":[{"id":"GHSA-xjw8-8c5c-9r79","url":"https://github.com/advisories/GHSA-xjw8-8c5c-9r79","severity":"CRITICAL","ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","vulnerableRanges":["<3.1.4.RELEASE"],"patched":["3.1.4.RELEASE"],"provenance":"source","from":"GHSA"},{"id":"GHSA-xjw8-8c5c-9r79","url":"https://github.com/advisories/GHSA-xjw8-8c5c-9r79","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-xjw8-8c5c-9r79","url":"https://github.com/advisories/GHSA-xjw8-8c5c-9r79","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-23573","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-23573","exploited":true,"exploitedSince":"2026-10-10","provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2026-04-17","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2026-40478","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-40478","provenance":"source"},{"date":"2026-10-10","kind":"euvd-exploited","label":"ENISA EUVD: exploited","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-23573","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":66.1,"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":13.4,"detail":"percentile 0.6700"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":1.37,"detail":"3 pulses"},{"name":"CVSS severity","points":6.37,"detail":"base score 9.1"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-thymeleaf-cve-2026-40478","packageHistory":[{"cve":"CVE-2026-40477","published":"2026-04-17","fixed":"3.1.4.RELEASE","kev":false},{"cve":"CVE-2026-40478","published":"2026-04-17","fixed":"3.1.4.RELEASE","kev":false},{"cve":"CVE-2026-41901","published":"2026-05-12","fixed":"3.1.5.RELEASE","kev":false,"link":{"from":"CVE-2026-40478","to":"CVE-2026-41901","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.thymeleaf:thymeleaf","fromFixed":"3.1.4.RELEASE","toFixed":"3.1.5.RELEASE","daysApart":25},{"kind":"version-step","provenance":"source","package":"Maven:org.thymeleaf:thymeleaf-spring5","fromFixed":"3.1.4.RELEASE","toFixed":"3.1.5.RELEASE","daysApart":25},{"kind":"similar","provenance":"machine","score":0.68,"basis":"same product + CWE + description similarity"}]}}],"package":"Maven:org.thymeleaf:thymeleaf"}}