Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Medium severity, with a CVSS score of 5.4, published 18 August 2026.
- Which products and versions are affected?
- getgrav/grav (Packagist) < 2.0.14.
- Is there a fix for This vulnerability?
- A patch was published on 2026-08-03: Patch available in version 2.0.14 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a web application.
- Am I affected?
- Check whether you run getgrav/grav (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability exists in Security::detectXss() in system/src/Grav/Common/Security.php. All XSS detection regex patterns use the PCRE /u (UTF-8) modifier; when preg_match() encounters even one invalid UTF-8 byte sequence in the input, it returns false for the entire call instead of attempting to match the pattern. Since detectXss() only checks truthiness of the return value, a single malformed UTF-8 byte silently causes all six XSS checks to fail. An authenticated attacker with page-edit permissions (without security.xss_whitelist privilege) can inject an invalid UTF-8 byte anywhere in the page content alongside malicious JavaScript, bypassing both the save-time Validation::checkSafety() gate and the render-time detectXssInEditorContent() backstop. The browser normalizes the invalid byte to U+FFFD and executes the stored XSS payload normally. A patch is available in version 2.0.14.
Affected products
- Getgrav Grav < 2.0.14
Timeline
- 2026-08-03: disclosed
- 2026-08-18: advisory
- 2026-08-03: patched: Patch available in version 2.0.14