Description
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.
Published: 2026-08-18
Score: 5.1 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Grav CMS was found to allow an authenticated attacker with page‑edit permissions, lacking the security.xss_whitelist privilege, to store malicious JavaScript in page content. The flaw lies in the Security::detectXss() function, where all XSS detection patterns use the PCRE /u modifier. A single invalid UTF‑8 byte anywhere in the content causes preg_match() to return false for every pattern, silently bypassing the safety gate at save time. When a visitor views the affected page, the stored payload executes in the browser, enabling actions such as session hijacking, defacement, or the propagation of additional malware.

Affected Systems

The vulnerable product is Grav CMS (vendor getgrav:grav). Versions prior to 2.0.14 are affected. No additional version specifics are provided in the advisory.

Risk and Exploitability

The CVSS score of 5.1 classifies the vulnerability as medium severity. EPSS information is not available, and it is not listed in the CISA KEV catalog, suggesting no widespread known exploitation. However, because the attack requires authentication with page‑edit rights, the risk is limited to users who have such permissions. The bypass occurs at the save time, so an attacker must be able to create or edit a page and then wait for a visitor to load the page for the payload to execute.

Generated by OpenCVE AI on August 18, 2026 at 12:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Grav CMS to version 2.0.14 or later to remove the vulnerable XSS detection logic.
  • If an upgrade is not immediately possible, remove or restrict page‑edit permissions for all users except trusted administrators, and consider implementing a whitelist of acceptable content types to prevent storage of arbitrary scripts.
  • Deploy a Web Application Firewall or manual content validation layer that rejects or sanitizes payloads containing JavaScript or other script tags before insertion into page content.

Generated by OpenCVE AI on August 18, 2026 at 12:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 11:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Grav before 2.0.14 Stored XSS via Invalid UTF-8 Byte
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-08-18T13:36:10.448Z

Reserved: 2026-08-18T10:57:39.580Z

Link: CVE-2026-75834

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-18T12:19:33.513

Modified: 2026-08-18T14:18:11.080

Link: CVE-2026-75834

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T12:45:06Z

Weaknesses
  • CWE-79

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