Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain or compromise editor-level credentials
-
DeliveryAuthenticate to Grav admin panel
-
ExploitCreate modular page embedding Twig XSS payload
-
ExecutionVictim or admin visits rendered parent page
-
PersistMalicious script executes in browser
-
ImpactHarvest session token or perform privileged actions
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires: (1) an attacker account with page-edit (editor-level) privileges on the target Grav installation - unauthenticated exploitation is not possible; (2) Grav CMS version between 2.0.0 and 2.0.17 inclusive; (3) the modular page feature must be in use (it is a standard Grav feature, not a non-default plugin); (4) a victim - including any administrator - must passively visit the parent page that renders the malicious modular child. What limits exploitation: the PR:L requirement means an attacker must possess or compromise valid editor credentials before the attack can be staged; there is no unauthenticated or network-only path. The attack does not require any special server configuration beyond standard Grav operation. |
| Impact | The CVSS 4.0 score of 5.1 (AV:N/AC:L/AT:N/PR:L/UI:P) accurately reflects the constrained impact: exploitation requires authenticated access with page-edit rights (PR:L) and passive user interaction from a victim (UI:P), and direct system impact is nil (VC:N/VI:N/VA:N). Subsequent-system impact is assessed as Low confidentiality and Low integrity (SC:L/SI:L), which is conservative - if the victim is an administrator, the practical integrity impact could be significantly higher through session theft or forced actions. The EPSS score is not provided in the source data, so probability of exploitation cannot be quantified independently. There is no KEV listing and no reported POC, suggesting this is not under active or opportunistic mass exploitation. That said, even a mid-sized municipal IT team in walbrzych running a Grav-based public portal with multiple content editors should treat this as a meaningful insider-threat or supply-chain-risk scenario: any editor with malicious intent or compromised credentials can silently backdoor all page visitors. The attack complexity is genuinely low once editor credentials are obtained. The principal limiting factor is the PR:L requirement - without editor-level credentials, remote exploitation is not possible. |
| Exploit ScenarioDerived | A low-privileged content editor with page-edit rights logs into the Grav admin panel and creates a modular page containing a Twig block that outputs a JavaScript payload stealing session cookies. When a site administrator later visits the parent page, the malicious script executes silently in their browser, exfiltrating the admin session token to an attacker-controlled server. No public POC has been identified, but the attack requires only basic Twig knowledge and standard editor credentials. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 04, 2026
Stored cross-site scripting in Grav CMS versions 2.0.0 through 2.0.17 allows authenticated page editors to plant persistent XSS payloads via the modular page subsystem, which bypasses the CMS's save-time XSS sanitization entirely. By embedding malicious Twig template code into a modular page, an attacker with page-edit privileges can cause arbitrary JavaScript to execute in the browsers of any visitor to the parent page - including site administrators. If an administrator is targeted, the attacker can escalate to full site compromise through session hijacking or forced admin-side actions. No public exploit code has been identified at time of analysis, and the CVE is not listed in CISA KEV.
RemediationAI
Upstream fix availability should be confirmed by consulting the GitHub Security Advisory at https://github.com/getgrav/grav/security/advisories/GHSA-fg8g-663r-f366; no specific patched version number was provided in the available source data, so administrators should check that advisory directly for the minimum safe version. Until a patch is applied, the most effective compensating control is to restrict page-edit access strictly to fully trusted users - remove editor-role access from any account that does not require it, since the attack requires PR:L (authenticated editor). Operators should also audit existing modular pages for unexpected Twig expressions or embedded script tags. Disabling the modular page feature entirely (if not operationally required) eliminates the attack surface for this specific bypass. Content Security Policy headers can reduce, but not eliminate, the browser-side impact of any injected scripts. No side-effect-free workaround that preserves full modular-page functionality is apparent without the vendor patch.
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 an open-source flat-file CMS (cpe:2.3:a:getgrav:grav) written in PHP that uses Twig as its templating engine. Grav supports 'modular pages' - sub-pages that are assembled into a parent page at render time. The vulnerability (CWE-79, Stored XSS) arises because Grav's save-time XSS detection logic is applied to standard pages but not to modular pages. Since Twig is a full-featured template language, an attacker with page-edit access can embed Twig expressions or raw HTML/JavaScript blocks inside a modular page's content. When the parent page renders the modular child at request time, these payloads are output unescaped into the final HTML, executing in the visitor's browser context. The root cause is incomplete input validation coverage - a well-known CWE-79 pattern where sanitization is applied inconsistently across equivalent content types.
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:N/VI:N/VA:N/SC:L/SI:L/SA:N
Editor credentials required (PR:L), victim must visit page (UI:R), scope changes to victim browser affecting session confidentiality and integrity (S:C/C:L/I:L).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Grav versions 2.0.0 through 2.0.17 fail to apply save-time XSS detection to modular pages, allowing authenticated page editors to store Twig-assembled XSS payloads. Attackers with page-edit rights can create modular pages with malicious Twig code that executes in visitor browsers when the parent page is rendered, including in administrator sessions.
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
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
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-71021
GHSA-xm9c-rv38-f24j
NVD
CVE.org
EPSS
Exploit-DB