PoC Monitor
← All CVEs
CVE-2026-40478published 17 Apr 2026 21:57 UTCData: JSON · API

Thymeleaf

Improper neutralization of specific syntax patterns for unauthorized expressions in Thymeleaf

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.

First public PoC 11 daysafter publication · 29 Apr 2026
Public PoCs11 on GitHub
CVSS9.1critical · scored by CNA · CWE-917
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

thymeleaf thymeleaf
  • < 3.1.4.RELEASE

Fixed in 3.1.4.RELEASE

thymeleaf org.thymeleaf:thymeleaf-spring5
  • < 3.1.4.RELEASE

Fixed in 3.1.4.RELEASE

thymeleaf org.thymeleaf:thymeleaf-spring6
  • < 3.1.4.RELEASE

Fixed in 3.1.4.RELEASE

Mitigation

Upgrade thymeleaf to 3.1.4.RELEASE or later.

Upgrade org.thymeleaf:thymeleaf-spring5 to 3.1.4.RELEASE or later.

Upgrade org.thymeleaf:thymeleaf-spring6 to 3.1.4.RELEASE or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8+10+12CVE published17 Apr 2026 · t = 0First public PoC29 Apr 2026 · t+11d

First public PoC 11 days after publication; not in CISA KEV. First PoC: bmvermeer/thymeleaf.CVE_2026_40478 (created 29 Apr 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

1 PoCs

PoCs 1
RepositoryCreatedStarsAssessment
bmvermeer/thymeleaf.CVE_2026_40478 29 Apr 2026 +11 d 1 PoC
Flags · score 15
  • no network code found (normal for a local exploit)

Below the suspicion threshold (50); does not change the assessment.

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

PoC characteristics

What to hunt for in your logs · from 1 PoC repo

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

GET /greet/unsafe
(?i)^/greet/unsafe\?(?:.*&)?name=
GET /page/unsafe
(?i)^/page/unsafe\?(?:.*&)?page=

Suricata

Template generated from PoC characteristics. Review before deploying.

GET /greet/unsafe
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-40478 thymeleaf thymeleaf exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/greet/unsafe"; http.uri; content:"name="; reference:url,poc.griffinguard.io/cve/CVE-2026-40478; classtype:web-application-attack; sid:9734059; rev:1;)
GET /page/unsafe
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-40478 thymeleaf thymeleaf exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/page/unsafe"; http.uri; content:"page="; reference:url,poc.griffinguard.io/cve/CVE-2026-40478; classtype:web-application-attack; sid:9636335; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

GET /greet/unsafe
title: thymeleaf thymeleaf exploit attempt (CVE-2026-40478)
id: gg-pocmon-cve-2026-40478-9734059
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40478. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-40478
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/greet/unsafe'
    cs-uri-query|contains|all:
      - 'name='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.40478
GET /page/unsafe
title: thymeleaf thymeleaf exploit attempt (CVE-2026-40478)
id: gg-pocmon-cve-2026-40478-9636335
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40478. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-40478
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/page/unsafe'
    cs-uri-query|contains|all:
      - 'page='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.40478