CVE-2026-100671 Details
Description
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.
A vulnerability in Grav CMS versions 2.0.19 through 2.0.24, as well as 2.0.0 through 2.0.18 and 1.7.x (only when content Twig is enabled), allows page content created by users with page-write permissions to access request cookies, including the session cookie. This occurs because the Twig sandbox permits the use of 'get_cookie()', which reads cookies server-side, bypassing the protections of the HttpOnly, Secure, and SameSite attributes. The extracted session cookie is then cached and can be served to unauthenticated visitors, enabling them to impersonate an administrator who previously viewed the page.
Users can update to Grav version 2.0.25, where this vulnerability is fixed. Alternatively, for versions 2.0.19 through 2.0.24, the 'security.twig_content.process_enabled' setting can be disabled or 'system.pages.never_cache_twig' can be set to true to prevent Twig content from being cached.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 26, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/getgrav/grav/security/advisories/GHSA-pp89-h475-7gj6 | [email protected] | AdvisoryExploitRemedyVendor |
| https://www.vulncheck.com/advisories/grav-before-2.0.25-session-cookie-theft-via-twig-sandbox | [email protected] | AdvisoryRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Grav | >= 2.0.19, <= 2.0.24 (semver) >= 2.0.0, <= 2.0.18 (semver) >= 1.7, <= 1.7 |
CPE
Remediation
| |
Change History
1 change record found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 26, 2026 | New CVE Received | [email protected] |
Volerion