CVE-2026-72832: Grav Cross-Site Scripting Vulnerability
MODERATECVE-2026-72832 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Grav libraries in the Packagist ecosystem. The issue involves stored xss via quoted-attribute bypass in detectxss. Remediation is available by upgrading affected packages to version 2.0.13.
CVE-2026-72832 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-72832
To remediate this vulnerability, upgrade all affected Grav dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getgrav/grav to 2.0.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getgrav/grav
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-72832, inspect your project dependencies for Grav:
inspect dependencies for getgrav/grav
Analyze the terminal output to locate any version of Grav in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.13), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Grav, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-72832 Affected Grav Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getgrav/grav
|
Packagist |
≥ 1.5.2
< 2.0.13
|
2.0.13
|
References
Frequently Asked Questions
What is CVE-2026-72832?
Which Grav versions are affected?
What version fixes CVE-2026-72832?
Is getgrav/grav affected?
What is the CVSS score of CVE-2026-72832?
What CWE is associated with CVE-2026-72832?
How can I check Packagist dependencies for CVE-2026-72832?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-269c-h76q-8cxw",
"modified" : "2026-09-17T17:28:34Z",
"published" : "2026-09-17T17:28:34Z",
"aliases" : [ "CVE-2026-72832" ],
"summary" : "Grav: Stored XSS via quoted-attribute bypass in detectXss",
"details" : "### Summary\n\nA page editor without `admin.super` can place an event handler after a `>` inside a quoted attribute. Grav accepts and stores the page, then executes the handler in the application origin when a visitor opens it.\n\n### Details\n\n`Security::detectXss()` (`system/src/Grav/Common/Security.php:253`) anchors the `on_events` scan at `<` and uses `[^>]*?`, which cannot cross the first literal `>`. When that character is inside a quoted value, the browser keeps the tag open and parses the later `onerror` attribute, so the detector and browser disagree. `AdminController::savePage()` relies on this detector when saving content from page editors outside the `admin.super` whitelist.\n\n### PoC\n\nI reproduced this with `getgrav/grav` 2.0.11 (`ad9709f865b09b68798fb1ac375b484a8cc1d892`), Admin 1.10.52, and Quark 2 1.1.4.\n\n1. Sign in as a user with `admin.login` and `admin.pages`, but without `admin.super`.\n2. Create or edit `/xsstest` and save this page body:\n\n```html\n<img src=x title=\">\" onerror=alert(document.domain)>\n```\n\n3. Open `/xsstest` in a private browser window.\n\nThe save succeeds and the visitor sees an alert containing the site domain. With the body changed to `<img src=x onerror=alert(1)>`, the same endpoint rejects it with `XSS issue detected` and does not store it.\n\n### Impact\n\nA page editor can execute JavaScript in the origin of every user who views the stored page, including unauthenticated visitors.\n\n### Anticipated objection and response\n\nAlthough the `detectXss()` docblock describes it as a heuristic that cannot catch every XSS, this check is the storage-time boundary for page editors outside the default `security.xss_whitelist` of `admin.super`. The same endpoint rejects a plain handler but accepts this executable form, allowing a lower-trust editor to cross the boundary the check is intended to enforce.\n\n### Suggested fix\n\nPrefer an HTML tokenizer or sanitizer that rejects event-handler attributes on parsed elements. If the existing tripwire remains, make its tag scan quote-aware instead of treating every `>` as a boundary. Add double-quoted and single-quoted regression cases plus the rejected plain-handler control.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getgrav/grav"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.2"
}, {
"fixed" : "2.0.13"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.12"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/security/advisories/GHSA-269c-h76q-8cxw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-72832"
}, {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getgrav/grav"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/grav-before-stored-xss-via-quoted-attribute-bypass"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-17T17:28:34Z",
"nvd_published_at" : null
}
}