Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate as low-privilege page editor
-
DeliveryEmbed malicious addJs() Twig call in page body
-
ExploitPublish page (XSS scanner passes payload)
-
InstallAdministrator or visitor loads the page
-
C2Unescaped script tag emitted into document head
-
ExecuteAttacker JavaScript executes in victim browser
-
ImpactSession token or credentials exfiltrated
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 an authenticated account with page-edit rights on a Grav 2.0 installation running the default configuration ( |
| Impact | The CVSS 4.0 score of 5.1 (Medium) reflects the PR:L (authenticated page editor) and UI:P (passive victim page load) constraints, which correctly limit the raw score. However, the real-world risk to multi-author Grav 2.0 instances is meaningfully higher than the score suggests: because the injected script executes in every visitor's browser including administrators, a low-privilege compromise can escalate to full site takeover via session hijacking or credential theft. The XSS scanner bypass is a compounding factor - standard Grav defences do not flag the payload at save time, making detection difficult without server-side log analysis. The CVSS 4.0 subsequent-system impact (SC:L/SI:L) acknowledges the admin-escalation path but conservatively scores it as low. No KEV listing and no confirmed public POC are recorded at time of analysis, indicating no observed mass exploitation. EPSS data was not supplied. For sites with untrusted or externally managed page editors, risk should be treated as elevated regardless of the numeric score. |
| Exploit ScenarioDerived | A user holding only page-editor rights creates or edits a Grav page and inserts a Twig expression such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 05, 2026
Stored XSS in Grav CMS before 2.0.20 lets low-privileged page editors inject arbitrary JavaScript that executes in every visitor's browser, including administrators, by abusing the Twig content sandbox's allowlisted addJs/addCss methods on Grav\Common\Assets. The asset URL is concatenated directly into <script src> and <link href> tags in the document head without output escaping, and Grav's built-in XSS scanner cannot detect the payload because addJs() mutates the shared Assets service and returns only an object key - no inspectable markup is produced at scan time. Vendor-released patch Grav 2.0.20 is available; no public exploit has been identified at time of analysis.
RemediationAI
Upgrade to Grav 2.0.20, which applies the fix in commit a4e8c4b748eb338ee7ab1dd26e7620a93bade047 and addresses the unescaped output sink in the asset rendering pipeline. The canonical advisory is https://github.com/getgrav/grav/security/advisories/GHSA-8hgv-xc77-jmcr. If immediate upgrade is not possible, the most effective compensating control is to restrict page-edit rights exclusively to fully trusted users, since the exploit requires an authenticated editor account. Operators can also set security.twig_content.process_enabled: false in user/config/security.yaml to disable Twig rendering in page content entirely, but this will break any pages that legitimately use Twig shortcodes or plugins that depend on content-level Twig processing. Removing addcss and addjs from the sandbox allowlist in SandboxDefaults.php is a targeted workaround but requires patching the framework manually and will need to be reapplied after any Grav core update.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, 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 PHP CMS that in its 2.0 branch renders editor-authored Twig templates inside page content by default, governed by a sandbox policy defined in system/src/Grav/Common/Twig/Sandbox/SandboxDefaults.php. The sandbox allowlists the addcss and addjs methods on Grav\Common\Assets, authorising their invocation from untrusted page Twig. The flaw (CWE-79: Improper Neutralization of Input During Web Page Generation) lies in the downstream render sink: Assets/Js.php:46 (and analogous files for CSS, Link, JsModule) builds the HTML tag by plain string concatenation - '<script src="' . trim($this->asset) . $this->renderQueryString() . '"' . $this->renderAttributes() - with no escaping applied to the attacker-controlled asset string. Because the sandbox policy arbitrates the method *call*, not its rendered output, the sanitisation boundary and the output sink are entirely disconnected. The affected CPE is cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* covering all 2.0 releases up to and including 2.0.19; Grav 1.7 does not use the Twig content sandbox and is not affected.
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:L/VI:L/VA:N/SC:L/SI:L/SA:N
PR:L for authenticated page-editor requirement; S:C because injected script executes in admin browser context; UI:R for passive victim page load; no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
Grav before 2.0.20 contains a cross-site scripting vulnerability in the Twig sandbox policy that allowlists addJs and addCss methods on Grav\Common\Assets without proper output escaping. Page editors can inject arbitrary script by registering malicious assets or injecting attributes, which are rendered unescaped into document head tags and executed for all visitors including administrators.
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-71999
GHSA-5pmv-xr2f-mrf8
NVD
CVE.org
EPSS
Exploit-DB