CVE-2026-27948: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-27948 is a reflected cross-site scripting (XSS) vulnerability in Copyparty, a portable file server application. The flaw exists in versions prior to 1.20.9 and is triggered via the URL parameter ?setck=..., which fails to properly sanitize user-supplied input before reflecting it in the browser. It was disclosed on February 25, 2026, via a GitHub Security Advisory (GHSA-62cr-6wp5-q43h) and published to the NVD on February 26, 2026. The vulnerability carries a CVSS v3.1 base score of 5.4 (Moderate) (Github Advisory, Security Advisory).

Technical details

The root cause is improper neutralization of user-controllable input during web page generation (CWE-79). The setck URL parameter was passed directly into the response without adequate sanitization or encoding, allowing an attacker to inject arbitrary JavaScript. The fix introduced a strict allowlist regex (RE_SETCK = re.compile(r"[^0-9a-z=]")) that rejects any setck value containing characters outside lowercase alphanumerics and =, and also limits the value length to 9 characters. Additionally, the unescape_cookie function was updated to truncate non-password cookie values to 3 characters, further reducing the attack surface (Patch Commit, Security Advisory).

Impact

Successful exploitation allows an attacker to execute arbitrary JavaScript in the browser of a victim who clicks a crafted malicious link, within the context of the Copyparty application. The worst-case outcome, as noted by the vendor, is that the injected script could move, delete, or upload files on the server using the victim's authenticated session. This could lead to session hijacking, credential theft, unauthorized file operations, or application defacement, though the impact is limited to individual users who interact with the malicious link and does not affect server availability (Security Advisory, Github Advisory).

Exploitability

No public proof-of-concept exploit code is known to exist, and there is no evidence of in-the-wild exploitation at this time. The vulnerability requires user interaction — a victim must click a specially crafted URL — which limits opportunistic exploitation. The EPSS score is approximately 0.041% (13th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (Github Advisory).

Exploitation steps

  1. Reconnaissance: Identify publicly accessible Copyparty instances running versions prior to 1.20.9 using search engines, Shodan, or Censys.
  2. Craft malicious URL: Construct a URL targeting the vulnerable Copyparty instance with a malicious payload in the setck parameter, e.g., https://<target>/path?setck=<script>alert(document.cookie)</script> or a URL-encoded equivalent.
  3. Deliver the link: Send the crafted URL to a target user via phishing email, social engineering, or by embedding it in a shared resource, tricking them into clicking it.
  4. Script execution: When the victim clicks the link and their browser loads the page, the unsanitized setck value is reflected into the HTML response and the injected JavaScript executes in the context of the Copyparty application.
  5. Achieve objective: Use the executed script to steal session cookies, perform unauthorized file operations (upload, move, delete) on behalf of the victim, or exfiltrate sensitive information (Security Advisory).

Indicators of compromise

  • Logs: Copyparty server log and reverse proxy access log entries containing requests where the setck parameter is followed by a % character; detectable with: grep -E '[?&]setck=[^&"]*%' (Security Advisory).
  • Network: Unusual HTTP GET requests to Copyparty endpoints with URL-encoded characters (e.g., %3C, %3E, %22, %27) in the setck parameter value.
  • Logs: Unexpected file operations (uploads, moves, deletions) in Copyparty logs attributed to authenticated user sessions shortly after suspicious setck parameter requests.

Mitigation and workarounds

Upgrade Copyparty to version 1.20.9 or later, which introduces strict input validation on the setck parameter and limits cookie value processing. No configuration-based workaround is available for unpatched versions; upgrading is the only reliable remediation. As supplementary measures, implement Content Security Policy (CSP) headers on the Copyparty deployment, educate users to avoid clicking unsolicited links, and monitor server logs for the IOC pattern described above (Github Advisory, Patch Commit).

Additional resources


Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-v2f8-6655-7grjCRITICAL10
  • Python logoPython
  • vibe-trading-ai
NoYesOct 02, 2026
CVE-2026-105782HIGH7.5
  • Python logoPython
  • scrapy
NoYesOct 06, 2026
GHSA-v853-p72q-4cfwHIGH7.5
  • Python logoPython
  • quart
NoYesOct 05, 2026
CVE-2026-105751MEDIUM6.9
  • Python logoPython
  • docling
NoYesOct 05, 2026
CVE-2026-105750MEDIUM5.9
  • Python logoPython
  • docling
NoYesOct 05, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management