Grav
Grav before 2.0.25 Session Cookie Theft via Twig Sandbox
Grav is a flat-file CMS. In versions 2.0.19 through 2.0.24 — and in 2.0.0 through 2.0.18 and 1.7.x only where content Twig has been explicitly enabled — page content authored by a user holding only page-write permission is rendered through a Twig sandbox that allowlists get_cookie(), which returns any cookie sent with the current request, including the visitor's session cookie. Because the read occurs server-side via filter_input(INPUT_COOKIE, ...), the HttpOnly, Secure and SameSite attributes offer no protection. Grav then stores the finished post-Twig output in a page-content cache keyed only on page identity and the configuration checksum, with no session, user or request dimension and no bypass for authenticated visitors. A page published by a page-write user can therefore capture the session identifier of the next administrator who views it, after which the cached output serves that identifier to unauthenticated visitors, who can replay the cookie to authenticate as that administrator. Since 2.0.19, security.twig_content.process_enabled defaults to true and Security::applyTwigContentDefault() derives each page's process.twig flag from that gate, so content Twig runs on every page with no frontmatter or operator action. Fixed in 2.0.25; 1.7.x is outside the backport scope.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.0.25
Fixed in 2.0.25
Mitigation
Upgrade grav to 2.0.25 or later.
References
- Vendor advisory github.com/getgrav/grav/security/advisories/GH…
Timeline
Days relative to CVE publicationFirst public PoC 5.1 days after publication; not in CISA KEV. First PoC: canhieu/cve-2026-100671-poc (created 1 Oct 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| canhieu/cve-2026-100671-poc | 1 Oct 2026 +5.1 d | 0 | PoC |
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 repoGET /api/v1/users
- Key headers
Cookie: {var}={var}- Ports
- 8080
- Seen in
- 1 repo: canhieu/cve-2026-100671-poc
- Evidence
- canhieu/cve-2026-100671-poc/exploit.py:270-274
POST /api/v1/auth/token
- Key headers
Accept: application/json- Body markers
"username":"password":inapplication/json- Ports
- 8080
- Seen in
- 1 repo: canhieu/cve-2026-100671-poc
- Evidence
- canhieu/cve-2026-100671-poc/exploit.py:182-190
POST /api/v1/pages
- Key headers
Accept: application/jsonAuthorization: Bearer {var}- Body markers
"route":"title":"content":{{ get_cookie(system.session.name((base_dir|md5)|slice(0,7))COOKIE_NAME=COOKIE_VALUE=inapplication/json- Ports
- 8080
- Seen in
- 1 repo: canhieu/cve-2026-100671-poc
- Evidence
- canhieu/cve-2026-100671-poc/exploit.py:216-229 canhieu/cve-2026-100671-poc/exploit.py:31-36
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/v1/users(?:[?#].*)?$
(?i)^/api/v1/auth/token(?:[?#].*)?$
(?i)^/api/v1/pages(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-100671 getgrav grav exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/v1/users"; http.header_names; content:"Cookie"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-100671; classtype:web-application-attack; sid:9762014; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-100671 getgrav grav exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/v1/auth/token"; http.header; content:"Accept: application/json"; nocase; http.request_body; content:"|22|username|22|:"; http.request_body; content:"|22|password|22|:"; reference:url,poc.griffinguard.io/cve/CVE-2026-100671; classtype:web-application-attack; sid:9125760; rev:1;)
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2026-100671 getgrav grav exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/v1/pages"; http.header; content:"Accept: application/json"; nocase; http.header; content:"Authorization: Bearer "; nocase; http.request_body; content:"|22|route|22|:"; http.request_body; content:"|22|title|22|:"; http.request_body; content:"|22|content|22|:"; http.request_body; content:"{{ get_cookie("; http.request_body; content:"system.session.name"; http.request_body; content:"((base_dir|7c|md5)|7c|slice(0,7))"; http.request_body; content:"COOKIE_NAME="; http.request_body; content:"COOKIE_VALUE="; reference:url,poc.griffinguard.io/cve/CVE-2026-100671; classtype:web-application-attack; sid:9295480; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: getgrav grav exploit attempt (CVE-2026-100671)
id: gg-pocmon-cve-2026-100671-9762014
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-100671. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-100671
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/v1/users'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.100671
title: getgrav grav exploit attempt (CVE-2026-100671)
id: gg-pocmon-cve-2026-100671-9125760
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-100671. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-100671
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/v1/auth/token'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.100671
title: getgrav grav exploit attempt (CVE-2026-100671)
id: gg-pocmon-cve-2026-100671-9295480
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-100671. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-100671
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/v1/pages'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.100671