---
id: CVE-2026-75834
title: >-
  Grav before 2.0.14 contains a stored cross-site scripting vulnerability in the
  Security::detectXss() function (system/src/Grav/Common/Security.php)
summary: >-
  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
  b…
severity: medium
cvss: 5.4
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-79
published: '2026-08-18'
updated: '2026-09-08'
sourceUpdated: '2026-09-08T20:32:39.347'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-75834'
references:
  - url: 'https://github.com/getgrav/grav/security/advisories/GHSA-q2j8-x8hf-63ch'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/grav-before-stored-xss-via-invalid-utf-8-byte
    label: disclosure@vulncheck.com
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-75834'
  - url: 'https://github.com/advisories/GHSA-q2j8-x8hf-63ch'
tags:
  - nvd
  - ghsa
  - composer
epss: 0.00255
epssPercentile: 0.1516
ingestedAt: '2026-09-08T21:11:12.280Z'
aliases:
  - GHSA-q2j8-x8hf-63ch
ecosystem: composer
vendor: getgrav
product: getgrav/grav
affected:
  - getgrav/grav < 2.0.14
patched:
  - getgrav/grav 2.0.14
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-75834)

Affected packages:

- `getgrav/grav < 2.0.14`

Patched in:

- `getgrav/grav 2.0.14`

Source: https://github.com/advisories/GHSA-q2j8-x8hf-63ch
