CVE-2026-75834: Grav Package Vulnerability Allows XSS Bypass via Invalid UTF-8 Input

getgrav/grav Updated 18 Sep 2026

Summary

17/09/2026
Yes i
Moderate
5.4

CVE-2026-75834: Vulnerability Details Component: getgrav/grav core File: system/src/Grav/Common/Security.php Function: detectXss() (all six entries in the $patterns array use the PCRE u modifier), invoked from Grav\Common\Data\Validatio... Affects getgrav/grav versions < 2.0.14. Fixed in 2.0.14. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Grav is a modern open-source flat-file content management system (CMS) that allows users to create and manage websites without the need for a traditional database. It is designed for speed and simplicity, utilizing a file-based architecture that enables easy deployment and management of content. However, Grav has a vulnerability in its security detection mechanism that can lead to cross-site scripting (XSS) attacks when invalid UTF-8 bytes are present in user input.

Vulnerability Detail

The vulnerability arises from the detectXss() function in the Grav core, specifically in the Security.php file. This function uses regular expressions with the PCRE u modifier to detect XSS patterns. When the input contains even a single invalid UTF-8 byte, the preg_match() function fails and returns false for all checks, allowing potentially malicious content to bypass the XSS safety gate. This can lead to stored XSS attacks, where an attacker can inject JavaScript code that executes in the browser of any visitor, including administrators.

How To Fix

Minimum fixed version

2.0.14

This is the first release that contains the fix.

composer require getgrav/grav:2.0.14

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can manually validate user input to ensure it is valid UTF-8 before it reaches the detectXss() function. This can be done using the mb_check_encoding() function in PHP, which checks if the string is valid UTF-8. If the input is invalid, you can reject it or sanitize it before processing.

Conclusion

CVE-2026-75834 presents a significant security risk for Grav users, allowing XSS attacks through invalid UTF-8 input. It is crucial to update to the latest version of Grav to mitigate this vulnerability. Additionally, implementing input validation can serve as a temporary measure until the update is applied.

See every vulnerability recorded for getgrav/grav →

Share this vulnerability

FAQ

CVE-2026-75834 is a vulnerability in the Grav CMS that allows attackers to bypass XSS protections by using invalid UTF-8 bytes in user input.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your composer.lock file without needing to sign up.

The main risk is stored XSS, where an attacker can inject malicious JavaScript that executes in the browsers of users visiting the affected page, potentially compromising their sessions.

To update your Grav installation, run the command composer update getgrav/grav in your terminal. Ensure you are using version 2.0.14 or later to mitigate the vulnerability.

If you cannot update immediately, implement input validation using mb_check_encoding() to ensure all user input is valid UTF-8 before processing it.

Related vulnerabilities

Recent vulnerabilities recorded for getgrav/grav.

How To Fix

Minimum fixed version

2.0.14

This is the first release that contains the fix.

composer require getgrav/grav:2.0.14

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback