{"id":"CVE-2026-40478","aliases":["CVE-2026-40478","GHSA-xjw8-8c5c-9r79"],"related":[],"kind":"vulnerability","state":"published","title":"Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf","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 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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### 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 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).\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### Credits\nThanks to Dawid Bakaj (VIPentest.com) for responsible disclosure.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Thymeleaf es un motor de plantillas Java del lado del servidor para entornos web y autónomos. Las versiones 3.1.3.RELEASE y anteriores contienen una vulnerabilidad de omisión de seguridad en los mecanismos de ejecución de expresiones. Aunque la biblioteca proporciona mecanismos para prevenir la inyección de expresiones, no logra neutralizar adecuadamente patrones de sintaxis específicos que permiten la ejecución de expresiones no autorizadas. Si un desarrollador de aplicaciones pasa entrada de usuario no validada directamente al motor de plantillas, un atacante remoto no autenticado puede omitir las protecciones de la biblioteca para lograr la inyección de plantillas del lado del servidor (SSTI). Este problema ha sido corregido en la versión 3.1.4.RELEASE.","source":"nvd"}],"published":"2026-04-15T19:46:23.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","score":8.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"}],"cwes":["CWE-917","CWE-1336"],"affected":[{"ranges":[{"version":"< 3.1.4.RELEASE","status":"affected"}],"vendor":"thymeleaf","product":"thymeleaf","source":"cvelist"},{"ranges":[{"version":"< 3.1.4.RELEASE","status":"affected"}],"vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring5","source":"cvelist"},{"ranges":[{"version":"< 3.1.4.RELEASE","status":"affected"}],"vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring6","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1779528224","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces 3.28","package":"devspaces/openvsx-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3.28::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1779359423","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces 3.28","package":"devspaces/pluginregistry-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3.28::el9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat build of Apache Camel for Spring Boot 4","package":"camel-thymeleaf","cpe":"cpe:/a:redhat:camel_spring_boot:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat build of Apache Camel for Spring Boot 4","package":"thymeleaf","cpe":"cpe:/a:redhat:camel_spring_boot:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Fuse 7","package":"thymeleaf","cpe":"cpe:/a:redhat:jboss_fuse:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 7","package":"smallrye-mutiny-vertx-web-templ-thymeleaf","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 7","package":"thymeleaf","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 7","package":"vertx-web-templ-thymeleaf","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 8","package":"smallrye-mutiny-vertx-web-templ-thymeleaf","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 8","package":"thymeleaf","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform 8","package":"vertx-web-templ-thymeleaf","cpe":"cpe:/a:redhat:jboss_enterprise_application_platform:8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"smallrye-mutiny-vertx-web-templ-thymeleaf","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"spring-boot-starter-thymeleaf","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"thymeleaf","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"thymeleaf-extras-java8time","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"thymeleaf-spring5","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat JBoss Enterprise Application Platform Expansion Pack","package":"vertx-web-templ-thymeleaf","cpe":"cpe:/a:redhat:jbosseapxp","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","package":"spring-boot-starter-thymeleaf","cpe":"cpe:/a:redhat:red_hat_single_sign_on:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","package":"thymeleaf","cpe":"cpe:/a:redhat:red_hat_single_sign_on:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","package":"thymeleaf-extras-java8time","cpe":"cpe:/a:redhat:red_hat_single_sign_on:7","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Single Sign-On 7","package":"thymeleaf-spring5","cpe":"cpe:/a:redhat:red_hat_single_sign_on:7","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.4.RELEASE"}],"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf","purl":"pkg:maven/org.thymeleaf/thymeleaf","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.4.RELEASE"}],"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring5","purl":"pkg:maven/org.thymeleaf/thymeleaf-spring5","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.1.4.RELEASE"}],"ecosystem":"Maven","package":"org.thymeleaf:thymeleaf-spring6","purl":"pkg:maven/org.thymeleaf/thymeleaf-spring6","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.4"}],"vendor":"thymeleaf","product":"thymeleaf","cpe":"cpe:2.3:a:thymeleaf:thymeleaf:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-40478","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2459349","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40478.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:21772","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40478","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/thymeleaf/thymeleaf","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-04-21T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40478","url":"https://www.cve.org/CVERecord?id=CVE-2026-40478","licence":"CVE Terms of Use","modified":"2026-08-18T12:05:25.573Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xjw8-8c5c-9r79","url":"https://github.com/advisories/GHSA-xjw8-8c5c-9r79","licence":"CC-BY-4.0","modified":"2026-05-05T16:12:18.897Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40478","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40478","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:18.976Z","epss":{"score":0.01122,"percentile":0.67124,"date":"2026-12-01T12:00:22.000Z"}}