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

CVE-2026-30974: Stored Cross-Site Scripting via SVG Uploads in copyparty

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 10, 2026·5 min read·14 visits

Executive Summary (TL;DR)

copyparty before v1.20.11 fails to sanitize SVG files under the 'nohtml' flag, enabling Stored XSS via embedded script tags in user-uploaded images.

A Stored Cross-Site Scripting (XSS) vulnerability exists in copyparty prior to version v1.20.11. The 'nohtml' volume configuration flag fails to restrict SVG images, allowing authenticated attackers with write permissions to upload malicious SVGs that execute arbitrary JavaScript when viewed by other users.

Vulnerability Overview

copyparty operates as a portable file server supporting volume-specific configuration flags to manage client interactions. The nohtml volume flag is implemented to secure volumes containing untrusted user uploads. When active, this flag instructs the server to serve potentially dangerous web documents as plaintext, neutralizing active content and preventing script execution in the client browser.

Prior to version v1.20.11, the nohtml flag failed to identify and neutralize SVG (Scalable Vector Graphics) files. The W3C SVG specification natively supports the inclusion of executable JavaScript via the embedded <script> element. Because the application processes these files without stripping the active content or overriding the content type, the system exposes a Stored Cross-Site Scripting (XSS) attack surface (CWE-79).

The vulnerability is triggered when a user interacts with the malicious file hosted on the server. Because the execution occurs within the context of the copyparty server's origin, the script assumes the privileges and session state of the victim interacting with the resource.

Root Cause Analysis

The vulnerability stems from flawed MIME type validation logic within the copyparty/httpcli.py module. The original implementation utilized a simplistic substring check to determine if a requested file should be stripped of its active execution context. The application verified if the string html was present in the resolved MIME type of the requested file.

SVG files resolve to the standard MIME type image/svg+xml. Because this MIME type lacks the html substring, the server's validation check evaluates to false. Consequently, the application bypasses the defensive forced-plaintext conversion and serves the file with its original, executable MIME type.

Modern web browsers strictly adhere to the provided MIME type. When the browser receives a file labeled image/svg+xml, it initializes an XML parser to render the document structure. During this parsing phase, the browser evaluates and executes any <script> elements present within the XML tree, leading directly to arbitrary JavaScript execution.

Code Analysis

The vulnerable code path in copyparty/httpcli.py demonstrates the inadequate MIME type verification. The implementation applied a plaintext override exclusively if the exact substring html was detected in the file's MIME type.

# Vulnerable implementation in httpcli.py
if "nohtml" in self.vn.flags and "html" in mime:
    mime = "text/plain; charset=utf-8"

The remediation introduced in commit 1c9f894e149b6be3cc7de81efc93a4ce4766e0e5 transitions the security model from a reactive blacklist to an aggressive, regex-based MIME allow-list. The server now evaluates the MIME type against the pattern html|script|tension|wasm|xml. Any MIME type containing these strings, which includes the xml portion of image/svg+xml, triggers the defensive remapping.

# Patched logic forces unsafe types to plaintext or octet-stream
if "nohtml" in self.vn.flags and re.search(r"html|script|tension|wasm|xml", mime):
    if "text/" in mime or "xml" in mime:
        mime = "text/plain; charset=utf-8"
    else:
        mime = "application/octet-stream"

Furthermore, the patch implements defense-in-depth by injecting the X-Content-Type-Options: nosniff HTTP header globally. This prevents browsers from overriding the safe text/plain designation through client-side MIME sniffing algorithms.

Exploitation Methodology

Exploitation requires the attacker to possess write access to a copyparty volume. The authorization requirement satisfies the Privileges Required (PR:L) metric in the CVSS scoring. The attacker constructs a valid SVG XML document containing a malicious JavaScript payload enclosed within standard <script> tags.

<svg xmlns="http://www.w3.org/2000/svg">
  <script>alert('Execution Context: ' + document.domain);</script>
  <rect width="100" height="100" fill="red" />
</svg>

The attacker uploads this payload to the target volume. The attack remains dormant until a victim navigates to the file via the copyparty web interface or a direct link. The requirement for a victim to browse to the specific file satisfies the User Interaction (UI:R) metric.

Upon rendering the response, the victim's browser executes the JavaScript payload. The attacker achieves arbitrary code execution within the security context of the victim's session.

Security Impact Assessment

The direct impact of CVE-2026-30974 is the complete compromise of the victim's session integrity on the copyparty server. Because the JavaScript executes within the application's origin, the script bypasses the Same-Origin Policy (SOP) restrictions that normally isolate distinct web applications.

The attacker's code operates with the identical authorization level as the victim. If an administrator views the malicious SVG, the script can leverage the administrator's session tokens to perform privileged actions. These actions include modifying server configurations, deleting sensitive files from protected volumes, or exfiltrating data to an external command-and-control server.

The vulnerability receives a CVSS v3.1 base score of 4.6 (Medium). The score is constrained by the necessity for pre-existing write access to the volume and the requirement for explicit victim interaction to trigger the payload execution. Despite the medium quantitative score, the qualitative risk is substantial for instances hosting highly privileged administrative accounts.

Remediation and Mitigation

The definitive remediation for this vulnerability is upgrading the copyparty instance to version v1.20.11 or later. This release incorporates the comprehensive MIME type filtering logic, the global nosniff header, and architectural segregations for UI assets. System administrators must apply this update immediately to instances exposing public or untrusted upload directories.

Administrators must verify their volume configurations post-update. Volumes intended for untrusted user content must have the nohtml flag explicitly declared in the volume configuration block. The patch relies on this flag being active to enforce the defensive text/plain remapping.

Version v1.20.11 introduces a secondary defense-in-depth mechanism via the noscript volume flag. Administrators should enable this flag on public volumes. When active, copyparty serves content with a strict Content-Security-Policy: script-src 'none'; HTTP header, instructing compliant browsers to block all JavaScript execution regardless of the file's MIME type.

Official Patches

copypartySecurity Patch Commit
copypartyv1.20.11 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
4.6/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N

Affected Systems

copyparty

Affected Versions Detail

Product
Affected Versions
Fixed Version
copyparty
9001
< 1.20.111.20.11
AttributeDetail
Vulnerability TypeStored Cross-Site Scripting (CWE-79)
CVSS v3.1 Score4.6 (Medium)
Attack VectorNetwork
Privileges RequiredLow (Write Access)
User InteractionRequired
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

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

The application does not adequately neutralize user-controlled input before placing it in output that is used as a web page.

Vulnerability Timeline

Security patch committed and version v1.20.11 released.
2026-03-08
Official CVE/GHSA publication.
2026-03-10

References & Sources

  • [1]GitHub Security Advisory GHSA-m6hv-x64c-27mm
  • [2]Fix Commit 1c9f894e149b6be3cc7de81efc93a4ce4766e0e5
  • [3]copyparty v1.20.11 Release Notes
  • [4]CVE.org Record for CVE-2026-30974

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

•about 6 hours ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•about 15 hours ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
8 views•7 min read
•2 days ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
9 views•6 min read
•3 days ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read
•3 days ago•GHSA-X9F6-9RVM-MMRG
6.9

GHSA-X9F6-9RVM-MMRG: Improper Access Control and Volume Mount Isolation Bypass in vantage6 Node

An improper access control vulnerability in the vantage6 node component allows concurrently running algorithm containers to read and modify sensitive input and output files of other tasks. The lack of strict workspace directory isolation exposes a significant attack surface in multi-tenant or federated environments where untrusted algorithms are executed.

Amit Schendel
Amit Schendel
3 views•4 min read
•3 days ago•CVE-2026-47760
8.7

CVE-2026-47760: Cross-Site Scripting (XSS) via SVG Namespace Sanitizer Bypass in TinyMCE

TinyMCE versions 6.8.0 through 7.0.1 contain a high-severity Cross-Site Scripting (XSS) vulnerability. The flaw exists in the custom HTML parser and sanitizer module, which incorrectly manages SVG namespace scopes when parsing nested elements. A low-privileged or unauthenticated attacker can submit a crafted HTML payload containing nested SVG structures to bypass sanitization filters, leading to arbitrary JavaScript execution in the context of the victim's browser session.

Alon Barad
Alon Barad
30 views•7 min read