Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-72583

CVE-2026-72583: fastschema Stored XSS Vulnerability

CVE-2026-72583 is a stored XSS vulnerability in fastschema through v0.15.1 that allows authenticated users to upload malicious SVG files. This article covers the technical details, affected versions, and mitigation strategies.

Published:

CVE-2026-72583 Overview

CVE-2026-72583 is a stored cross-site scripting (XSS) vulnerability in fastschema through version v0.15.1. A low-privileged authenticated user can upload a Scalable Vector Graphics (SVG) file containing malicious JavaScript by bypassing the Multipurpose Internet Mail Extensions (MIME) type allow-list check. Once stored and served by the application, the SVG executes attacker-controlled script in the browser of any user who retrieves it. The flaw is tracked as CWE-79 and affects the upload path implemented in the fastschema filesystem layer.

Critical Impact

Authenticated attackers can persistently store JavaScript payloads that execute in other users' sessions, enabling session theft, action forgery, and unauthorized content changes.

Affected Products

  • fastschema through version v0.15.1
  • Deployments exposing the file upload endpoint to authenticated users
  • Applications serving uploaded SVG assets inline from the same origin

Discovery Timeline

  • 2026-08-10 - CVE-2026-72583 published to the National Vulnerability Database (NVD)
  • 2026-08-10 - Last updated in NVD database

Technical Details for CVE-2026-72583

Vulnerability Analysis

The vulnerability resides in the file upload validation logic of fastschema. The application implements a MIME type allow-list intended to restrict upload types, but the check can be bypassed by supplying a crafted Content-Type header or by relying on client-supplied MIME metadata rather than content sniffing. An attacker uploads an SVG document containing an embedded <script> element or event handler such as onload. When another user requests the stored asset, the browser renders the SVG as XML and executes the embedded JavaScript in the application origin.

Because the payload persists on the server, every viewer of the malicious asset becomes an XSS target. The Common Vulnerability Scoring System (CVSS) vector indicates a scope change, reflecting that the injected script executes in the victim's browser context outside the upload subsystem's own security boundary.

Root Cause

The root cause is insufficient validation of uploaded file content. The MIME allow-list check relies on trust-boundary-crossing metadata rather than server-side content inspection and does not enforce a rendering policy for SVG assets. The upload handling logic in the fastschema repository under pkg/rclonefs/base.go accepts SVG documents without sanitizing embedded scripting constructs. See the fastschema base.go source for the affected code path.

Attack Vector

An authenticated user with upload privileges submits an SVG file whose MIME declaration passes the allow-list. The SVG body embeds JavaScript, for example inside a <script> element or an event attribute on an SVG shape. The file is stored and later served with an image or XML content type from the application origin. Any user who views the asset triggers script execution, enabling cookie theft, cross-site request forgery pivoting, or defacement inside the fastschema application context.

No verified public exploit code is available. See the fastschema project repository for source-level details.

Detection Methods for CVE-2026-72583

Indicators of Compromise

  • SVG files stored in fastschema upload directories containing <script> elements, javascript: URIs, or on* event handler attributes
  • HTTP upload requests where the declared Content-Type is image/svg+xml or a mismatched image type but the payload contains XML script constructs
  • Outbound requests from user browsers to attacker-controlled domains shortly after viewing uploaded assets

Detection Strategies

  • Scan the upload store for SVG content matching regular expressions for <script, onload=, onerror=, onclick=, and href="javascript:
  • Inspect web server access logs for GET requests to SVG assets followed by anomalous authenticated session activity from the same client
  • Correlate file upload events by low-privileged users with subsequent script-execution telemetry in browser or endpoint logs

Monitoring Recommendations

  • Alert on any SVG upload to fastschema and quarantine for content inspection before publication
  • Monitor Content Security Policy (CSP) violation reports for script-src violations originating from asset URLs
  • Track privilege escalation, password change, and session token reuse events that follow SVG asset views

How to Mitigate CVE-2026-72583

Immediate Actions Required

  • Disable SVG uploads in fastschema until a patched release is deployed
  • Audit the existing upload store and remove SVG files containing script constructs or event handlers
  • Serve user-uploaded content from a separate, sandboxed origin to contain any residual XSS

Patch Information

No fixed version is listed in the NVD entry at publication. Track the fastschema project repository for releases after v0.15.1 that address the MIME allow-list bypass and add SVG sanitization.

Workarounds

  • Force SVG downloads by setting Content-Disposition: attachment and a non-renderable Content-Type such as application/octet-stream
  • Deploy a strict Content Security Policy that disallows inline scripts on pages that embed user-uploaded assets
  • Sanitize SVG content server-side using a library that strips <script>, event handlers, and external references before storage
  • Validate uploads by parsing file content server-side rather than trusting the client-supplied MIME type
bash
# Example nginx configuration to force SVG downloads from the upload path
location /uploads/ {
    types { } 
    default_type application/octet-stream;
    add_header Content-Disposition "attachment";
    add_header Content-Security-Policy "default-src 'none'; sandbox;";
    add_header X-Content-Type-Options "nosniff";
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.