CVE-2026-64851 Grav Shortcode Core Plugin: Stored XSS in shortcode-core attribute handlers
An attacker with admin.pages permission can inject stored XSS via shortcode attributes, executing scripts for visitors or administrators viewing the page.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-64851?
CVE-2026-64851 is a high-severity cross-site scripting vulnerability in getgrav grav-plugin-shortcode-core, published on 19 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Grav Shortcode Core Plugin allows for the development shortcode plugins that utilize the common format utilized by WordPress and BBCode. Prior to 6.2.2, Grav Shortcode Core passes shortcode syntax through Security::detectXss() because it contains no literal less-than character, then ColorShortcode.php and related attribute handlers concatenate an attacker-controlled parameter into HTML without encoding. An account with admin.pages permission can close the generated attribute and add an event handler, creating stored cross-site scripting that executes for visitors or administrators who view the page. This issue is fixed in version 6.2.2.
Weakness: CWE-79
Which versions are affected by CVE-2026-64851?
How do I fix CVE-2026-64851?
No fix has been published for CVE-2026-64851 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-64851 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-64851 exists.
Sources
Also known as GHSA-q5fw-vpqc-fgph.