CVE-2025-27145: 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.
Published Feb 26, 2025
Affected packages
copyparty
- Ecosystem
- PyPI
- Affected
- < 1.16.15
- Fixed in
- 1.16.15
- Check
pip show copyparty
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 ``
- Drag-and-drop the file into the browser to initiate an upload
- The
alert(1)is executed
Credited to JayPatel48.
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/releases/tag/v1.16.15
- https://github.com/advisories/GHSA-m2jw-cj8v-937r
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-104102
copyparty FTP: upload outside defined volumes (limited path traversal)
medium5.3Oct 15, 2026CVE-2026-70657
Copyparty vulnerable to file/dirkey confusion
medium4.3Aug 18, 2026CVE-2026-32108
Copyparty ftp/sftp: Sharing a single file did not fully restrict source-folder access
low2.3Mar 12, 2026CVE-2026-32109
Copyparty has unexpected JavaScript execution via crafted URL to folder with `.prologue.html`
low3.7Mar 12, 2026CVE-2026-30974
copyparty: volflag `nohtml` did not block javascript in svg files
medium4.6Mar 10, 2026CVE-2026-27948
Copyparty vulnerable to reflected XSS via setck parameter
medium5.4Feb 26, 2026
