ghsa-m2jw-cj8v-937r
Vulnerability from github
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": [ { "package": { "ecosystem": "PyPI", "name": "copyparty" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "1.16.15" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-27145" ], "database_specific": { "cwe_ids": [ "CWE-79", "CWE-83" ], "github_reviewed": true, "github_reviewed_at": "2025-02-26T20:06:56Z", "nvd_published_at": "2025-02-25T02:15:16Z", "severity": "LOW" }, "details": "## Summary\n\nA [DOM-Based XSS](https://capec.mitre.org/data/definitions/588.html) was discovered in [copyparty](https://github.com/9001/copyparty), a portable fileserver. The vulnerability is considered low-risk.\n\n## Details\n\nBy handing someone a maliciously-named file, and then tricking them into dragging the file into copyparty\u0027s 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).\n\nNote: As a general-purpose webserver, it is intentionally possible to upload HTML-files with arbitrary javascript in `\u003cscript\u003e` 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.\n\n## Proof of Concept (POC)\n\n1. Create an empty file named `\u003cimg src=x onerror=\"alert(1)\"\u003e`\n2. Drag-and-drop the file into the browser to initiate an upload\n3. The `alert(1)` is executed", "id": "GHSA-m2jw-cj8v-937r", "modified": "2025-02-26T20:06:56Z", "published": "2025-02-26T20:06:56Z", "references": [ { "type": "WEB", "url": "https://github.com/9001/copyparty/security/advisories/GHSA-m2jw-cj8v-937r" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27145" }, { "type": "WEB", "url": "https://github.com/9001/copyparty/commit/438ea6ccb06f39d7cbb4b6ee7ad44606e21a63dd" }, { "type": "PACKAGE", "url": "https://github.com/9001/copyparty" }, { "type": "WEB", "url": "https://github.com/9001/copyparty/releases/tag/v1.16.15" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N", "type": "CVSS_V3" } ], "summary": "copyparty renders unsanitized filenames as HTML when user uploads empty files" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.