# CVE-2026-40478: Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf - Exploited (CISA KEV): no - Published: 2026-04-17 - CVSS: 9.1 CRITICAL (v3.1) - EPSS: 1.1% (66th percentile) - CWE: CWE-917, CWE-1336 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. ## Edge WAF coverage (claimed by vendors, not measured) | Vendor | Status | First rule | Days after publication | |---|---|---|---| | Cloudflare | No public claim | — | — | | AWS | No public claim | — | — | | Microsoft Azure | No public claim | — | — | | Google Cloud | No public claim | — | — | | Fastly | Before feed history | — | — | | F5 | Rule published | 2026-07-07 | 81 | | Akamai | No public source | — | — | | OWASP CRS | No public claim | — | — | ### F5 - 2026-07-07 · new · rule 200204074 > Added: signature 200204074 "Thymeleaf Remote Code Execution (1)" (Server Side Code Injection, risk High), systems: Other Web Server. References: CVE-2026-40478. Source: https://docs.cloud.f5.com/docs-v2/platform/changelogs/security-details-changelog - 2026-07-07 · new · rule 200204075 > Added: signature 200204075 "Thymeleaf Remote Code Execution (2)" (Server Side Code Injection, risk High), systems: Other Web Server. References: CVE-2026-40478. Source: https://docs.cloud.f5.com/docs-v2/platform/changelogs/security-details-changelog "No public claim" means no vendor statement names this CVE; "Before feed history" means the CVE is older than the vendor feed. In both cases generic rules may still block it. HTML: https://cve.vigilbase.com/cve/CVE-2026-40478 · JSON: https://cve.vigilbase.com/api/v1/cves/CVE-2026-40478