copyparty renders unsanitized filenames as HTML when user uploads empty files
Summary
A DOM-Based XSS was discovered in copyparty, a portable fileserver. The vulnerability is considered low-risk.
Details
By handing someone a maliciously-named file, and then tricking them into dragging the file into copyparty's Web-UI, an attacker could execute arbitrary javascript with the same privileges as that user. For example, this could give unintended read-access to files owned by that user. The bug is triggered by the drag-drop action itself; it is not necessary to actually initiate the upload. The file must be empty (zero bytes).
Note: As a general-purpose webserver, it is intentionally possible to upload HTML-files with arbitrary javascript in <script> tags, which will execute when the file is opened. The difference is that this vulnerability would trigger execution of javascript during the act of uploading, and not when the uploaded file was opened.
Proof of Concept (POC)
- Create an empty file named
<img src=x onerror="alert(1)"> - Drag-and-drop the file into the browser to initiate an upload
- The
alert(1)is executed
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | copyparty | < 1.16.15 | 1.16.15 |
References
- https://github.com/9001/copyparty/security/advisories/GHSA-m2jw-cj8v-937r
- https://nvd.nist.gov/vuln/detail/CVE-2025-27145
- https://github.com/9001/copyparty/commit/438ea6ccb06f39d7cbb4b6ee7ad44606e21a63dd
- https://github.com/9001/copyparty
- https://github.com/9001/copyparty/releases/tag/v1.16.15
- https://pypi.org/project/copyparty
- https://github.com/advisories/GHSA-m2jw-cj8v-937r
- CVSS vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N- Weakness (CWE)
CWE-79, CWE-83- Platform
- Python (PyPI)
- Package
copyparty- Disclosed
- 26.02.2025
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1278 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-m2jw-cj8v-937r - CC BY 4.0
Vulnerability history: copyparty
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 14
- First → latest
- 07.2023 08.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- High 3
- Medium 8
- Low 3
Disclosures per year
- 2023: 3
- 2024: 0
- 2025: 6
- 2026: 5
-
copyparty renders unsanitized filenames as HTML when user uploads empty files this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.