Technical impact
Grav versions from 1.5.2 through 2.0.12 contain a stored cross‑site scripting flaw in the Security::detectXss() routine. The detector searches for event handlers anchored at a literal '<' and uses a regular expression that stops at the first '>' character. When an attacker places a '>' inside a quoted attribute value, the browser keeps the tag open and then parses a subsequent event handler such as onerror. The detector never sees the handler but the browser executes it, allowing arbitrary JavaScript to run in the site’s origin. The flaw is listed as CWE‑79 and can provide attackers with the ability to run scripts on the pages of any visitor who loads the malicious content.
Affected Systems
All Grav installations with versions from 1.5.2 up to 2.0.12 are affected. The vulnerability is present in the core Grav CMS and can be triggered on any site where users with editor or page‑builder permissions can store page content. Admins without the special admin.super role are not prevented from editing and can inject the malicious payloads described in the advisory.
Risk and Exploitability
The exploitation path requires only the ability to edit and save page content, which can be done by users with low‑level authorisation. Once the malicious string is stored, it is executed for every visitor, including unauthenticated users. The CVSS score of 5.1 places the risk in the moderate range. The EPSS score of less than 1% indicates a very low probability of widespread exploitation at the moment, and the vulnerability is not listed in the CISA KEV catalog, suggesting no large‑scale attacks have been documented yet. Nonetheless the ease of injecting the payload into any editable page makes targeted attacks plausible.
Github GHSA