Description
Grav contains a stored cross-site scripting vulnerability in shortcode-core attribute handlers where the XSS detection scan only matches payloads containing literal angle brackets, allowing shortcode parameters to bypass validation. Attackers with admin.pages permission can inject malicious JavaScript through shortcode attributes that execute in any viewer's browser, including administrators, enabling session hijacking via admin nonce theft.
Published: 2026-07-21
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Grav CMS has a stored cross‑site scripting flaw in its shortcode‑core attribute handlers. The vulnerability arises because the detection routine only checks for literal angle brackets, so malicious script payloads embedded in shortcode attributes can bypass the validation. This allows an attacker who can edit pages (admin.pages permission) to inject JavaScript that executes in the browser of any visitor, including administrators, effectively enabling session hijacking through nonce theft. The weakness is a classic input‑validation error classified as CWE‑79.

Affected Systems

All installations of Grav CMS that are running the affected code base are potentially impacted. The advisory does not list specific version numbers, implying that current releases are at risk until a patch is applied. The vulnerability applies to the core shortcode processing functionality supplied by the getgrav:grav package.

Risk and Exploitability

The CVSS score of 5.1 indicates moderate severity, and the EPSS score of less than 1% suggests a low probability of exploitation at present. The vulnerability is not listed in the CISA KEV catalog. Attackers must have authenticated administrative privileges with the admin.pages permission to inject the payload, but the impact is widespread since the injected script runs in the browsers of any user who views the compromised content. The flaw is relatively straightforward to exploit when administrative access is available, and the lack of a defensive runtime check makes mitigation primarily a patching effort.

Generated by OpenCVE AI on July 30, 2026 at 17:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest Grav release that contains the remediation for the shortcode‑core attribute handler vulnerability, which replaces the insecure parsing logic.
  • If an upgrade cannot be applied immediately, disable all shortcode processing from user‑editable content or selectively whitelist only safe shortcodes to prevent the payload from being interpreted.
  • Implement a Content‑Security‑Policy that disallows inline scripts and limits script execution to trusted domains, thereby reducing the risk of malicious code running even if the vulnerability is present.

Generated by OpenCVE AI on July 30, 2026 at 17:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 21 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Description Grav contains a stored cross-site scripting vulnerability in shortcode-core attribute handlers where the XSS detection scan only matches payloads containing literal angle brackets, allowing shortcode parameters to bypass validation. Attackers with admin.pages permission can inject malicious JavaScript through shortcode attributes that execute in any viewer's browser, including administrators, enabling session hijacking via admin nonce theft.
Title Grav Stored Cross-Site Scripting via Shortcode Attribute Handlers
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-79
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-23T18:22:05.939Z

Reserved: 2026-07-20T11:58:54.524Z

Link: CVE-2026-64628

cve-icon Vulnrichment

Updated: 2026-07-23T18:19:09.959Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T18:00:15Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')