Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain editor-level Grav credentials
-
DeliveryCraft page with invalid UTF-8 byte and XSS payload
-
ExploitSubmit page via web editor
-
Installpreg_match() returns false under PCRE /u mode
-
C2Malicious script bypasses safety gate and persists on disk
-
ExecuteVictim navigates to affected page
-
ImpactStored JavaScript executes in victim browser
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 Grav user account with page-edit permissions who does not hold the security.xss_whitelist privilege - the bypass specifically targets the check applied to non-whitelisted editors. The attacker must have access to Grav's page editing interface and the ability to save arbitrary byte sequences in page content, which is the default capability of the editor role. Exploitation is further gated by the requirement that a victim must passively navigate to the affected page (CVSS UI:P); the attacker cannot force execution without a real user visiting the URL. Installations where all editor accounts are held by fully trusted internal staff with no shared credentials are at reduced practical risk. The vulnerability does not affect unauthenticated visitors or read-only user roles, and does not provide server-side code execution. |
| Impact | The CVSS 4.0 score of 5.1 (Medium) accurately reflects the access prerequisites - PR:L (authenticated editor) and UI:P (passive victim interaction) - with downstream impact limited to the subsequent system (SC:L/SI:L), meaning the server itself is not directly compromised. No EPSS data was supplied and there is no CISA KEV entry, indicating no confirmed active exploitation at time of analysis. However, the practical barrier to exploitation is low: the bypass requires inserting a single malformed byte, a technique any editor-level user can apply without specialized tooling, and the flat-file storage model means payloads persist until explicitly removed. Even a mid-sized municipal IT team in swidnica running a Grav-powered intranet with shared editor accounts should treat this as a priority patch rather than a deferred risk, because the editor role is often assigned broadly in small content teams. The moderate CVSS score is appropriate for the global risk tier but may understate urgency in environments where the editor role is loosely controlled. |
| Exploit ScenarioDerived | An authenticated editor crafts a Grav page whose content begins with a single invalid UTF-8 byte (e.g., 0x80) followed by a standard script tag payload such as a cookie-exfiltration script. When saved, preg_match() returns false for every XSS pattern under /u mode, so checkSafety() passes the content without sanitization and the page is written to disk. Any visitor who browses to the page will have their session cookie or other browser-accessible data silently transmitted to an attacker-controlled endpoint. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 18, 2026
Stored XSS in Grav CMS before 2.0.14 allows authenticated page editors to bypass the save-time XSS detection gate by embedding a single invalid UTF-8 byte in page content, causing all PCRE /u-flagged patterns in Security::detectXss() to silently return false rather than flagging the payload. Any visitor who subsequently loads the affected page executes attacker-controlled JavaScript in their browser context. No public exploit code or CISA KEV listing has been identified at time of analysis, though the bypass mechanism is sufficiently documented in the vendor advisory that independent reproduction requires minimal effort.
RemediationAI
Upgrade Grav to version 2.0.14 or later, which is the vendor-confirmed fix per the GitHub security advisory at https://github.com/getgrav/grav/security/advisories/GHSA-q2j8-x8hf-63ch; this is the only confirmed remediation. If an immediate upgrade is not feasible, restrict page-edit permissions to the smallest possible set of fully trusted users and audit existing page content for unexpected script tags, event handlers, or encoded payloads. Deploying a Content Security Policy (CSP) header on the Grav front end (e.g., script-src 'self') will limit the impact of any already-stored XSS by blocking inline script execution, though this is a mitigating control only and does not prevent malicious content from being written to disk. Review the security.xss_whitelist configuration to ensure no unintended accounts hold whitelist privileges. Note that CSP may break legitimate inline scripts or third-party widget embeds and should be tested before deployment in production.
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; page content is stored on disk rather than in a database, meaning stored payloads persist and survive routine content caching cycles. The vulnerability is in system/src/Grav/Common/Security.php within the detectXss() method, which is invoked by Validation::checkSafety() at save time to screen editor-submitted content for script injection. All XSS detection regular expressions are compiled with the PCRE /u modifier, which instructs PHP to treat the subject string as UTF-8. When preg_match() encounters an invalid byte sequence under /u mode, it returns boolean false rather than integer 0; false is falsy in PHP, so every pattern check in the loop evaluates as 'no match found,' and the safety gate passes the content unconditionally. This is a CWE-79 (Improper Neutralization of Input During Web Page Generation) rooted in a subtle encoding-error handling flaw rather than a missing pattern. CPE cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* indicates all Grav versions prior to 2.0.14 carry this defect.
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
Requires low-privilege editor account (PR:L), victim must view the page (UI:R), and XSS executes in victim browser representing a scope change (S:C); no server-side confidentiality or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
Grav before 2.0.14 contains a stored cross-site scripting vulnerability in the Security::detectXss() function (system/src/Grav/Common/Security.php). All XSS detection patterns use the PCRE /u (UTF-8) modifier, so a single invalid UTF-8 byte anywhere in page content causes preg_match() to return false for every pattern, silently bypassing the save-time XSS safety gate (Validation::checkSafety()). An authenticated attacker with page-edit permissions (without the security.xss_whitelist privilege) can store malicious JavaScript that executes in the browser of a visitor who views the affected page.
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-60598
GHSA-993v-76jg-67xr
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB