CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-75828

CVE-2026-75828: Stored Cross-Site Scripting (XSS) via Security Filter Bypass in Grav CMS

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 18, 2026·4 min read·26 visits

Executive Summary (TL;DR)

A parser-differential flaw in Grav CMS's detectXss() filter allows authenticated editors to bypass event-handler detection using unpaired quotes in unquoted attribute values, resulting in stored cross-site scripting.

CVE-2026-75828 is a critical stored cross-site scripting (XSS) vulnerability in the getgrav Grav CMS before version 2.0.15. The vulnerability resides in the detectXss() security filter mechanism, where parser-differential mismatches between the regular-expression-based server-side validation and browser HTML5 tokenization allow authenticated editors to bypass event-handler detection and inject arbitrary JavaScript execution vectors.

Vulnerability Overview

Grav CMS is a flat-file content management system that processes content via Markdown and HTML rendering. To ensure safety, Grav employs a centralized security class containing a detectXss() method designed to intercept malicious scripts, event handlers, and unauthorized XML namespaces.

The attack surface of Grav CMS includes markdown-enabled input fields, pages, and metadata accessible to authenticated administrative users and editors. In certain configurations, plugins may expose this filter to unauthenticated inputs, widening the risk vector.

The core of the vulnerability is a parser-differential bug classified under CWE-79. The input validation filter relies on regular expressions that fail to accurately predict the state-machine logic used by modern web browsers when encountering malformed HTML.

Root Cause Analysis

The root cause lies in how Security::detectXss() tracks quote pairs. The filter uses regex patterns to identify inline event handlers (such as onerror=) while attempting to ignore harmless occurrences of these sequences within valid quoted attribute strings.

In HTML5, a quote character only starts a quoted attribute state if it immediately follows an equals sign (e.g., attr="value"). An unanchored quote inside an unquoted attribute string (such as the double quote in src=x") is parsed by browsers as a literal character rather than a string delimiter. The browser remains in the unquoted attribute state, and subsequent characters like space and onerror= are parsed as new, independent attributes.

In contrast, the PHP regex parser used in detectXss() treats any quote character as the start of an enclosed string literal. Upon encountering the unpaired quote inside src=x", the engine searches for a matching closing quote, consuming the rest of the element, including the real malicious event-handler attribute. Because the handler is matched inside what the regex assumes is a benign string, validation succeeds.

Code Analysis

The vulnerable regular expression configuration in system/src/Grav/Common/Security.php used a generic matching sequence for quotes: (?:"[^"]"|'[^']'). This pattern matched quotes globally without checking if they were actually part of an attribute assignment.

Below is the code snippet comparing the vulnerable and patched regex patterns:

// Vulnerable configuration
'on_events' => '#<(?:"[^"]*"|\'[^']*\'|[^>"\'])*?(?:[\s\x00-\x20\"\u0027\/]|"[^"]*"|\'[^']*\')on\s*[a-z]+\s*=#iu',
 
// Patched configuration in 2.0.15
'on_events' => '#<(?:=\s*"[^"]*"|=\s*\'[^']*\'|[^>])*?(?:[\s\x00-\x20\"\u0027\/]|=\s*"[^"]*"|=\s*\'[^']*\')on\s*[a-z]+\s*=#iu',

The updated regex binds the quote character to an assignment pattern (=\s*) before allowing the parser to consume the content as a string literal. If the quote is not preceded by an equals sign, the parser falls back to matching it as an ordinary tag-body character, forcing the scanner to process the subsequent onerror event handler correctly.

Exploitation Methodology

An authenticated editor with permissions to modify site markdown files can insert the malformed payload through the administration panel. Once saved, the raw string is written directly to the flat-file database.

The parser divergence can be visualized in the following diagram:

The payload <img src=x" onerror="alert(document.domain)"> cleanly bypasses the regular expression filter while remaining completely syntactically functional in Chromium-based and Firefox browsers, resulting in arbitrary JavaScript execution when the page is viewed.

Impact Assessment

The impact of stored cross-site scripting in a CMS environment like Grav is significant. An attacker can hijack the sessions of administrative users who visit the compromised pages, leading to complete control over the application.

Session hijacking allows attackers to execute administrative actions, such as adding backdoor accounts, installing malicious plugins, or reading confidential environment configurations.

Given the flat-file nature of Grav, access to the administration panel translates directly to remote code execution (RCE) on the underlying server. Since administrators can write templates or execute PHP files through standard features, XSS represents a gateway to complete host compromise.

Remediation & Detection

Security administrators must update Grav installations to version 2.0.15 immediately. If an automatic update via the administration console is not possible, the command-line package manager can be used.

For legacy installations where upgrading the entire CMS is infeasible, the patches to system/src/Grav/Common/Security.php should be applied manually to anchor all quote validation steps to the = operator.

Temporary protections can be configured on web application firewalls (WAF) to intercept requests containing unquoted attributes containing internal quotes followed by script handles. An example detection signature has been verified for application-level proxies.

Fix Analysis (1)

Technical Appendix

CVSS Score
9.3/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
EPSS Probability
0.34%
Top 72% most exploited

Affected Systems

Grav CMS

Affected Versions Detail

Product
Affected Versions
Fixed Version
grav
getgrav
< 2.0.152.0.15
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score9.3 (Critical)
EPSS Score0.00343
ImpactStored Cross-Site Scripting (XSS) leading to Session Hijacking / RCE
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The application does not neutralize or incorrectly neutralizes user-controlled input before it is placed in output that is used as a web page.

Known Exploits & Detection

GitHub Security AdvisoryOfficial advisory with details of the quote bypass vulnerability.

Vulnerability Timeline

Code patch committed to Grav repository
2026-07-30
Grav Core version 2.0.15 officially released containing the patch
2026-08-03
GitHub Security Advisory GHSA-vfmf-q6x9-cw96 published
2026-08-18
CVE-2026-75828 registered in the NVD
2026-08-18

References & Sources

  • [1]Grav GitHub Security Advisory
  • [2]VulnCheck Third-Party Advisory
  • [3]Grav Core Security Fix Commit
  • [4]Raw Git Patch Reference
  • [5]Official CVE Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•20 minutes ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
1 views•12 min read
•about 1 hour ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 2 hours ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 3 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
7 views•10 min read
•about 7 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 8 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
6 views•9 min read