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-75831

CVE-2026-75831: Stored Cross-Site Scripting in Grav CMS Audio/Video Media Rendering

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 17, 2026·6 min read·16 visits

Executive Summary (TL;DR)

A stored Cross-Site Scripting vulnerability in Grav CMS versions prior to 2.0.15 allows authenticated editors to insert arbitrary JavaScript via malicious audio/video file paths, which executes in the context of any user (including administrators) viewing the page.

Improper neutralization of input during web page generation in Grav CMS allows authenticated users with page modification privileges to execute stored Cross-Site Scripting (XSS) attacks. The flaw exists in AudioMediaTrait and VideoMediaTrait where media source URLs are concatenated directly into HTML templates without proper escaping.

Vulnerability Overview

The Stored Cross-Site Scripting (XSS) vulnerability, tracked as CVE-2026-75831 and GHSA-6qw9-4vv5-jr97, exists within the core media processing architecture of the Grav Content Management System (CMS). Grav utilizes a flat-file structure and processes Markdown elements through specialized traits that generate HTML structures. When handling audio and video file attachments, the system renders media elements via the Parsedown engine by invoking specific trait methods.

Specifically, the AudioMediaTrait and VideoMediaTrait components are responsible for transforming media markup into standard HTML <audio> and <video> tags. During this process, the system dynamically generates <source> elements using media path variables. If an authenticated user with page editing privileges submits a crafted path containing specific characters, those characters bypass standard encoding pipelines.

This vulnerability allows an attacker to insert arbitrary HTML and JavaScript directly into the rendered output of the page. Consequently, any subsequent user who accesses the compromised page will execute the injected script within their browser context. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation).

Root Cause Analysis

The primary defect resides in the implementation of the sourceParsedownElement method within both AudioMediaTrait and VideoMediaTrait. In vulnerable versions of Grav (prior to 2.0.15), this method constructs the HTML representing the media source by concatenating the unescaped path variable, $location, directly into a raw HTML template string.

While traditional image elements process source parameters through an attribute-escaping pipeline that filters special characters, the audio and video subsystems construct a hardcoded <source src="..."> string inside a rawHtml array key. This bypassed the standard security wrappers of the Parsedown engine. When a content editor uploads or links a media file, any query parameters or URL fragment structures appended to the filename are captured in the $location variable.

Although the core Grav architecture contains filtering logic to strip leading hash symbols (#) from parameters via the urlHash helper, it does not neutralize quotes, angle brackets, or script structures within the body of the URL fragment itself. This allows an attacker to craft a media reference where the fragment contains double quotes to break out of the HTML attribute value boundary.

Code Analysis

A comparison of the vulnerable codebase and the patched implementation demonstrates how the unescaped path variable was processed. In vulnerable releases, the code directly concatenated the path variable into the HTML string.

// Vulnerable implementation in AudioMediaTrait.php
protected function sourceParsedownElement(array $attributes, $reset = true)
{
    // ...
    return [
        'name' => 'audio',
        'rawHtml' => '<source src="' . $location . '">Your browser does not support the audio tag.',
        'attributes' => $attributes
    ];
}

The fix, introduced in Grav version 2.0.15, wraps the $location variable in PHP's standard htmlspecialchars function with the ENT_QUOTES configuration flag. This ensures that any double or single quotes, as well as angle brackets, are fully encoded to their respective HTML entities before rendering.

// Patched implementation in AudioMediaTrait.php
protected function sourceParsedownElement(array $attributes, $reset = true)
{
    // ...
    return [
        'name' => 'audio',
        'rawHtml' => '<source src="' . htmlspecialchars($location, ENT_QUOTES, 'UTF-8') . '">Your browser does not support the audio tag.',
        'attributes' => $attributes
    ];
}

Because the browser parser treats encoded entity characters as literal strings rather than executable syntactic elements, the execution boundary remains intact. An attacker's attempt to break out of the src attribute is rendered inert.

Exploitation Methodology

Exploitation requires an attacker to possess privileges that allow the creation or modification of Markdown pages within the Grav CMS. Such roles typically include Authors, Editors, or Contributors. The attacker initiates the exploit by embedding a media attachment containing a malformed filename fragment.

The payload relies on appending a double-quote character, a closing angle bracket, and a scripting payload to the media URL. For example, inserting a payload like video.mp4#"><script>alert(document.cookie)</script> breaks the structural syntax of the <source> tag.

When the system renders this Markdown page, the output converts into the following HTML structure: <source src="video.mp4#"><script>alert(document.cookie)</script>">. The browser parses the script block as an independent DOM node and executes it immediately under the security origin of the hosting domain.

Impact Assessment

The impact of CVE-2026-75831 is significant due to the stored nature of the script. Once an administrative user views the page, the injected JavaScript executes with the permissions of that administrator's active session. This can lead to complete session hijacking, cookie theft, or administrative actions performed silently in the background.

Because Grav uses administrative tokens and REST APIs to manage user accounts and system configuration, the malicious script can trigger requests that create new super-administrator accounts or execute file upload commands. Such actions can result in arbitrary code execution on the server hosting the CMS.

The vulnerability is assigned a CVSS v3.1 score of 7.6, indicating high severity due to the potential for scope change and high confidentiality impact. The EPSS score indicates a low initial probability of active exploitation in the wild, but administrators should treat any instance of stored script injection as critical.

Remediation & Defenses

The primary remediation strategy is upgrading the Grav CMS core installation to version 2.0.15 or newer. This version implements comprehensive attribute escaping on all audio and video media rendering pathways.

For environments where immediate system upgrades are impractical, administrators should implement a Content Security Policy (CSP) header that restricts script execution. Specifically, enforcing a policy that forbids inline scripts or requires unique cryptographic nonces prevents the injected payload from running even if the HTML structure is compromised.

Additionally, security teams can audit the existing Markdown pages by querying the file system for media extensions followed by suspicious HTML characters. Running a system-wide search inside the user/pages/ directory using regular expressions assists in locating pre-existing malicious payloads.

Official Patches

getgravOfficial patch fixing rawHtml source URL escaping

Fix Analysis (1)

Technical Appendix

CVSS Score
7.6/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
EPSS Probability
0.31%
Top 76% 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 (AV:N)
CVSS v3.1 Score7.6 (High)
EPSS Score0.00313 (0.31%)
ImpactStored Cross-Site Scripting (XSS)
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 product does not neutralize or incorrectly neutralizes user-controlled input before it is placed in output that is used as a web page that is served to other users.

Known Exploits & Detection

GitHub Security AdvisoryDescription of the stored XSS vulnerability and remediation details

Vulnerability Timeline

Vulnerability reported to the Grav development team
2026-07-30
Developer Andy Miller commits the fix
2026-07-31
Grav version 2.0.15 is officially released
2026-08-03
CVE-2026-75831 is published by VulnCheck and populated into NVD
2026-08-18

References & Sources

  • [1]GHSA-6qw9-4vv5-jr97: Stored XSS in Grav CMS Audio/Video Media Rendering
  • [2]Grav Fix Commit
  • [3]VulnCheck Advisory for CVE-2026-75831
  • [4]NVD - CVE-2026-75831

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

•1 day ago•CVE-2026-118777
4.8

CVE-2026-118777: Prototype Pollution in Forge HTTP Client Cookie Management

CVE-2026-118777 is a prototype pollution vulnerability (CWE-1321) in the Forge JavaScript cryptography and networking library (distributed on npm as node-forge) prior to version 1.4.1. The flaw resides in the forge.http client subsystem, where incoming HTTP cookie names and paths parsed from Set-Cookie response headers are stored directly into standard JavaScript objects without key validation or property isolation. By returning crafted Set-Cookie headers containing keys such as __proto__ or constructor, a malicious HTTP server can inject arbitrary properties into Object.prototype, attach attributes to the global Object constructor, or delete built-in prototype methods to cause an application-wide denial of service.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-118775
3.7

CVE-2026-118775: ASN.1 OID First Arc Truncation and Ambiguity in node-forge

CVE-2026-118775 (GHSA-4642-5mcj-2rqw) is an integer overflow and validation flaw in the ASN.1 serialization module of Forge (node-forge) prior to version 1.4.1. The asn1.oidToDer() function fails to validate the range of the first two arcs of an Object Identifier (OID) and truncates the packed initial subidentifier to a single 8-bit integer. Applications that perform policy checks on untrusted OID strings before encoding them into Distinguished Encoding Rules (DER) format can be tricked into emitting DER bytes that correspond to a completely different, restricted OID.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-119194
7.5

CVE-2026-119194: Algorithmic Complexity Denial of Service in pyasn1 Schemaless ASN.1 Decoder

CVE-2026-119194 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting versions 0.3.3 through 0.6.4. The flaw resides in the schemaless decoding routine ConstructedPayloadDecoderBase._decodeComponentsSchemaless used across BER, CER, and DER codecs. By sending an ASN.1 container populated with child components whose tag identifiers are separated by multiples of CPython's integer hash modulus (sys.hash_info.modulus), an unauthenticated attacker can force worst-case hash collisions in an unbounded Python set, degrading decoding performance from O(N) to O(N^2) and causing a Denial of Service (DoS).

Alon Barad
Alon Barad
7 views•9 min read
•1 day ago•CVE-2026-119195
7.5

CVE-2026-119195: Quadratic-Time Denial of Service in pyasn1 BER/CER/DER Decoders

CVE-2026-119195 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting all versions prior to 0.6.5. When decoding constructed strings or indefinite-length ANY types across BER, CER, and certain DER code paths, the payload decoders repeatedly concatenate incoming fragments onto an immutable bytes object using the += operator. Because Python bytes objects cannot be resized in-place, each fragment iteration allocates a new buffer and copies all previously accumulated bytes, resulting in quadratic O(N^2) time and memory copy complexity. An unauthenticated remote attacker can supply a highly fragmented ASN.1 stream to exhaust CPU cycles and stall application worker threads.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-119197
7.5

CVE-2026-119197: Quadratic Algorithmic Complexity Denial of Service in pyasn1 REAL Mantissa Decoder

An algorithmic complexity vulnerability (CWE-407) in pyasn1 versions prior to 0.6.5 allows unauthenticated attackers to cause a Denial of Service (DoS) via crafted ASN.1 payloads. The flaw resides in the binary-encoded ASN.1 REAL mantissa deserialization routine within RealPayloadDecoder.valueDecoder. By performing iterative byte-string slicing and repeated bitwise shifts on a growing arbitrary-precision integer, the decoder exhibits quadratic time and memory allocation complexity relative to the mantissa length. Supplying a BER-, CER-, or DER-encoded payload with a large REAL mantissa causes excessive CPU consumption and blocks application worker processes.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-119196
7.5

CVE-2026-119196: Quadratic CPU Consumption in pyasn1 Constructed BIT STRING Decoding

A vulnerability classified under CWE-407 (Inefficient Algorithmic Complexity) exists in the pyasn1 library prior to version 0.6.5. When parsing constructed ASN.1 BIT STRING payloads under BER, CER, or schema-driven DER encoding rules, the BitStringPayloadDecoder repeatedly shifts and copies the entire accumulated bit value for each incoming fragment. Processing inputs with a large number of small constructed fragments induces quadratic CPU consumption, allowing unauthenticated remote attackers to cause a denial of service via resource exhaustion during the initial decoding phase.

Alon Barad
Alon Barad
8 views•10 min read