Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain page-write access
-
DeliveryPublish page with get_cookie() Twig
-
ExploitAdmin views page, session read server-side
-
ExecutionSession cookie baked into shared page cache
-
PersistUnauthenticated visitor replays cookie
-
ImpactFull administrator account takeover
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK
2 techniques across 2 tactics: Collection, Discovery The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must hold page-write permission on the Grav instance and be able to publish/edit page content; an administrator (or higher-privileged user) must subsequently view the malicious page for their session cookie to be captured (UI:P). In versions 2.0.19-2.0.24 this works against default configurations because security.twig_content.process_enabled defaults to true and Security::applyTwigContentDefault() enables process.twig on every page. In 2.0.0-2.0.18 and 1.7.x, exploitation additionally requires that content Twig has been explicitly enabled (non-default). The shared page-content cache (keyed only on page identity plus config checksum, with no session/user/request dimension and no bypass for authenticated visitors) is what lets the captured cookie be replayed by unauthenticated visitors. 1.7.x receives no fix. |
| Impact | This is a genuine, high-priority issue for exposed Grav installs, not a paper-tiger high-CVSS. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P, VC:H/VI:H/VA:H, base 8.6) is credible: a low-privileged page-write user needs only network access and low attack complexity, and the sole limiting factor is that an administrator must eventually view the malicious page (UI:P). Crucially, since 2.0.19 security.twig_content.process_enabled defaults to true, so the exploit path is live on default configurations of the vulnerable 2.0.19-2.0.24 range - content Twig runs on every page with no operator action. There is no EPSS score, no CISA KEV listing, and no public POC provided, so exploitation status is: no public exploit identified at time of analysis - this reflects targeted/latent risk rather than confirmed mass exploitation. The one signal tension worth noting: CWE-200 (information disclosure) undersells the outcome, since captured admin session cookies enable full account takeover (integrity/availability impact), which is why the vendor rated VI:H/VA:H alongside VC:H. Net: real priority wherever untrusted contributors hold page-write and admins browse the front end; patch to 2.0.25. |
| Exploit ScenarioDerived | A user with only page-write permission publishes a page containing Twig that calls the sandbox-allowlisted get_cookie() to read whatever cookie the current request carries. When an administrator next views that page, the server-side read (via filter_input(INPUT_COOKIE, ...), bypassing HttpOnly/Secure/SameSite) captures the admin's session identifier and the post-Twig output is stored in a page cache keyed only on page identity plus config checksum; the cached page then serves that admin session cookie to unauthenticated visitors, who replay it to authenticate as the administrator. No public POC is referenced. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 26, 2026
Session cookie theft in Grav CMS 2.0.19 through 2.0.24 lets an authenticated user with only page-write permission capture the session identifier of any administrator who views their published page, because the Twig sandbox exposes get_cookie() and the post-Twig page cache is keyed without any session or request dimension. The poisoned cache then serves the stolen identifier to unauthenticated visitors, who can replay the cookie to authenticate as the administrator, yielding full confidentiality, integrity and availability impact on the instance. Exploitation is confirmed against default configurations in 2.0.19-2.0.24 (security.twig_content.process_enabled defaults to true and Security::applyTwigContentDefault() enables process.twig on every page), while 2.0.0-2.0.18 and 1.7.x are only affected if content Twig was explicitly enabled. No public exploit code or confirmed active exploitation was identified at time of analysis; the vendor-released fix is Grav 2.0.25, and 1.7.x is outside the backport scope.
RemediationAI
Upgrade to Grav CMS 2.0.25, which is the vendor-released patch that removes get_cookie() from the Twig sandbox allowlist and addresses the session-blind page cache; the vendor advisory is at https://github.com/getgrav/grav/security/advisories/GHSA-pp89-h475-7gj6. There is no fix for the 1.7.x branch, which is outside the backport scope, so 1.7.x deployments must migrate to the 2.0.25 line. If an immediate upgrade is not possible, the most direct compensating control is to set security.twig_content.process_enabled to false (and ensure individual pages do not set process.twig: true in frontmatter); the trade-off is that legitimate content Twig rendering, including shortcodes and dynamic page content implemented in Twig, will stop working, and this is a breaking change on 2.0.19-2.0.24 where the gate is on by default. Operators should also review and revoke the page-write permission from untrusted accounts, since exploitation requires the ability to publish page content, and purge the page-content cache after any suspected exposure so no captured session identifier remains cached. Because the attack abuses shared caching of authenticated output, putting Grav behind an authenticating reverse proxy or restricting read access to non-public pages reduces exposure but does not eliminate the risk if any administrator still browses cached content. Rotating session cookies for privileged accounts after patching is advisable to invalidate any identifiers already captured. No vendor mitigation short of upgrading fully removes the underlying request-scoped secret exposure.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Grav is a flat-file CMS whose pages are rendered through Twig; when content Twig is enabled, page body content authored by lower-privileged users is evaluated inside a Twig sandbox rather than treated as inert text. The sandbox for this issue allowlists get_cookie(), which is implemented as a server-side filter_input(INPUT_COOKIE, ...) read, so cookie attributes such as HttpOnly, Secure and SameSite provide no protection - the value is read before it ever reaches the browser and is whatever the current requester sent. The root cause class is CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor): the sandbox permits access to request-scoped secrets and the caching layer then fails to separate responses by session. Grav stores finished post-Twig output in a page-content cache keyed only on page identity plus the configuration checksum, with no session, user or request dimension and no bypass for authenticated visitors, so one rendered page is reused across all subsequent requesters. Since 2.0.19 the configuration gate security.twig_content.process_enabled defaults to true and Security::applyTwigContentDefault() derives each page's process.twig flag from that gate, meaning content Twig runs on every page without any frontmatter edit or operator action. The CWE reference from the input (CWE-200) aligns with the assessed CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H vector, which confirms network reachability, low privileges required (page-write), user interaction (an administrator must view the page), and high confidentiality, integrity and availability impact.
Know when Grav gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Low-priv page-write user (PR:L) over the network (AV:N/AC:L); an admin must view the poisoned page (UI:R); stolen session enables full admin takeover, so C/I/A all High.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
Note: the advisory as published lists "No known CVE".
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Grav CMS versions 2.0.19 through 2.0.24 are vulnerable to a high-severity session hijacking flaw that enables an attacker with page-write permissions to gain full administrative control, leading to potential data breaches, website defacement, and compliance violations. Organizations using these versions should prioritize remediation to protect sensitive information and maintain customer trust. No public exploit identified at time of analysis, and a vendor-released patch is available in version 2.0.25.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol
Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their
A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug
Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a
GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv
Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages
Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri
Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm
Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past
Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make
Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S
Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary
EUVD-2026-87765
GHSA-jcv9-gfgx-wjw4
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB