# CVE-2026-100671: Grav session cookie theft via Twig sandbox

Source: https://junglewise.ai/threats/cve-2026-100671-grav-is-a-flat-file-cms-in-versions-2-0-19-through-2-0-24-and-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-26. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-100671 · Severity: high · CVSS 8 · Published 2026-09-26

Grav is a flat-file CMS that allows editors to author content using Twig templates. A user with only page-write permission can craft a page that captures an administrator's session cookie when they view it, then serve that cookie to unauthenticated visitors who can replay it to take over the admin account. The vulnerability exists by default in affected versions due to overly permissive Twig sandboxing combined with a global page-content cache that stores captured cookies for all users.

Technologies: [Getgrav Grav](https://junglewise.ai/threats/technologies/getgrav-grav-1). Vendors: [Getgrav](https://junglewise.ai/threats/vendors/getgrav).

## Quick answers

**Is CVE-2026-100671 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-100671 being exploited in the wild.

**How severe is CVE-2026-100671?** High severity, with a CVSS score of 8, published 26 September 2026.

**Which products and versions are affected?** Getgrav Grav 2.0.0 through 2.0.24 (2.0.19-2.0.24 vulnerable by default; 2.0.0-2.0.18 only with content Twig explicitly enabled); 1.7.x only with content Twig explicitly enabled.

**Is there a fix for CVE-2026-100671?** A patch was published on 2026-09-26: Fixed in version 2.0.25 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-100671 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-100671?** Check whether you run Getgrav Grav at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability stems from three converging issues: (1) the Twig sandbox allowlists get_cookie() without name restrictions, allowing page content to read any cookie including session identifiers; (2) content Twig runs by default on all pages in 2.0.19+ via Security::applyTwigContentDefault(), requiring no frontmatter opt-in; (3) post-Twig output is cached globally keyed only on page identity and config checksum with no session, user, or request dimension. An attacker with page-write access can compute the session cookie name using exposed configuration (system.session.name) and derive the uniqueness suffix from base_dir's MD5 hash, then embed get_cookie() in page content to harvest cookies from visiting administrators and replay them to authenticate as those users.

## Affected products

- Getgrav Grav 2.0.0 through 2.0.24 (2.0.19-2.0.24 vulnerable by default; 2.0.0-2.0.18 only with content Twig explicitly enabled); 1.7.x only with content Twig explicitly enabled

## Timeline

- 2026-09-26: disclosed
- 2026-09-26: patched: Fixed in version 2.0.25

## References

- [https://github.com/getgrav/grav/security/advisories/GHSA-pp89-h475-7gj6](https://github.com/getgrav/grav/security/advisories/GHSA-pp89-h475-7gj6)
- [https://www.vulncheck.com/advisories/grav-before-2.0.25-session-cookie-theft-via-twig-sandbox](https://www.vulncheck.com/advisories/grav-before-2.0.25-session-cookie-theft-via-twig-sandbox)

## Related threats

- [Grav authorization bypass in Clockwork profiler debugger](https://junglewise.ai/threats/cve-2026-117604-grav-from-1-7-53-3-before-1-7-53-6-contains-an-authorization)
- [Grav information disclosure via form config directives](https://junglewise.ai/threats/cve-2026-112781-grav-from-2-0-0-before-2-2-2-contains-an-information-disclosure)
- [Grav allowlist bypass in Flex form field renaming](https://junglewise.ai/threats/cve-2026-112780-grav-from-2-0-15-before-2-2-2-contains-an-allowlist-bypass)
- [Grav sandbox escape via array filter](https://junglewise.ai/threats/cve-2026-100668-grav-2-0-0-through-2-0-24-contain-a-twig-content-sandbox-escape)
- [Grav may be vulnerable to SSRF attack via Twig Templates](https://junglewise.ai/threats/cve-2025-66844-grav-may-be-vulnerable-to-ssrf-attack-via-twig-templates)
