CVE-2025-27145: Copyparty Copyparty Renders Unsanitized Filenames As Vulnerability
LOWCVE-2025-27145 is a LOW (CVSS 3.6) copyparty renders unsanitized filenames as vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Copyparty libraries in the PyPI ecosystem. The issue involves copyparty renders unsanitized filenames as html when user uploads empty files. Remediation is available by upgrading affected packages to version 1.16.15.
CVE-2025-27145 at a Glance
Security Impact
CVSS: 3.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2025-27145
To remediate this vulnerability, upgrade all affected Copyparty dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install copyparty>=1.16.15
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show copyparty
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-27145, inspect your installed packages using pip:
pip show copyparty
Analyze the terminal output to locate any version of Copyparty in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16.15), your application is affected.
Note: The pip show copyparty command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Copyparty, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-27145 Affected Copyparty Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
copyparty
|
PyPI |
< 1.16.15
|
1.16.15
|
References
Frequently Asked Questions
What is CVE-2025-27145?
Which Copyparty versions are affected?
What version fixes CVE-2025-27145?
Is copyparty affected?
What is the CVSS score of CVE-2025-27145?
What CWE is associated with CVE-2025-27145?
How can I check PyPI dependencies for CVE-2025-27145?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m2jw-cj8v-937r",
"modified" : "2025-02-26T20:06:56Z",
"published" : "2025-02-26T20:06:56Z",
"aliases" : [ "CVE-2025-27145" ],
"summary" : "copyparty renders unsanitized filenames as HTML when user uploads empty files",
"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'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).\n\nNote: 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.\n\n## Proof of Concept (POC)\n\n1. Create an empty file named `<img src=x onerror=\"alert(1)\">`\n2. Drag-and-drop the file into the browser to initiate an upload\n3. The `alert(1)` is executed",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "copyparty"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.16.15"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-83" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-26T20:06:56Z",
"nvd_published_at" : "2025-02-25T02:15:16Z"
}
}