{"api_version":"1","generated_at":"2026-04-18T00:47:39+00:00","cve":"CVE-2026-40478","urls":{"html":"https://cve.report/CVE-2026-40478","api":"https://cve.report/api/cve/CVE-2026-40478.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-40478","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-40478"},"summary":{"title":"Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf","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 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.","state":"PUBLISHED","assigner":"GitHub_M","published_at":"2026-04-17 22:16:33","updated_at":"2026-04-17 22:16:33"},"problem_types":["CWE-917","CWE-1336","CWE-917 CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')","CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine"],"metrics":[{"version":"3.1","source":"security-advisories@github.com","type":"Secondary","score":"9","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","baseScore":9,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"9.1","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","data":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.1,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79","name":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79","refsource":"security-advisories@github.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-40478","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40478","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"thymeleaf","product":"thymeleaf","version":"affected < 3.1.4.RELEASE","platforms":[]},{"source":"CNA","vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring5","version":"affected < 3.1.4.RELEASE","platforms":[]},{"source":"CNA","vendor":"thymeleaf","product":"org.thymeleaf:thymeleaf-spring6","version":"affected < 3.1.4.RELEASE","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"product":"thymeleaf","vendor":"thymeleaf","versions":[{"status":"affected","version":"< 3.1.4.RELEASE"}]},{"product":"org.thymeleaf:thymeleaf-spring5","vendor":"thymeleaf","versions":[{"status":"affected","version":"< 3.1.4.RELEASE"}]},{"product":"org.thymeleaf:thymeleaf-spring6","vendor":"thymeleaf","versions":[{"status":"affected","version":"< 3.1.4.RELEASE"}]}],"descriptions":[{"lang":"en","value":"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."}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.1,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-917","description":"CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-1336","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-04-17T21:57:01.560Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","shortName":"GitHub_M"},"references":[{"name":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79","tags":["x_refsource_CONFIRM"],"url":"https://github.com/thymeleaf/thymeleaf/security/advisories/GHSA-xjw8-8c5c-9r79"}],"source":{"advisory":"GHSA-xjw8-8c5c-9r79","discovery":"UNKNOWN"},"title":"Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf"}},"cveMetadata":{"assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","assignerShortName":"GitHub_M","cveId":"CVE-2026-40478","datePublished":"2026-04-17T21:57:01.560Z","dateReserved":"2026-04-13T19:50:42.113Z","dateUpdated":"2026-04-17T21:57:01.560Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-17 22:16:33","lastModifiedDate":"2026-04-17 22:16:33","problem_types":["CWE-917","CWE-1336","CWE-917 CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')","CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine"],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","baseScore":9,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":2.2,"impactScore":6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"40478","Ordinal":"1","Title":"Improper neutralization of specific syntax patterns for unauthor","CVE":"CVE-2026-40478","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"40478","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"Improper neutralization of specific syntax patterns for unauthor"}]}}}