VYPR
Low severityNVD Advisory· Published Feb 25, 2025· Updated Feb 25, 2025

copyparty renders unsanitized filenames as HTML when user uploads empty files

CVE-2025-27145

Description

copyparty, a portable file server, has a DOM-based cross-site scripting vulnerability in versions prior to 1.16.15. The vulnerability is considered low-risk. 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 that, 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. Version 1.16.15 contains a fix.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
copypartyPyPI
< 1.16.151.16.15

Affected products

1

Patches

1
438ea6ccb06f

fix GHSA-m2jw-cj8v-937r ;

https://github.com/9001/copypartyedFeb 24, 2025via ghsa
1 file changed · +2 2
  • copyparty/web/up2k.js+2 2 modified
    @@ -1319,7 +1319,7 @@ function up2k_init(subtle) {
             if (bad_files.length) {
                 var msg = L.u_badf.format(bad_files.length, ntot);
                 for (var a = 0, aa = Math.min(20, bad_files.length); a < aa; a++)
    -                msg += '-- ' + bad_files[a][1] + '\n';
    +                msg += '-- ' + esc(bad_files[a][1]) + '\n';
     
                 msg += L.u_just1;
                 return modal.alert(msg, function () {
    @@ -1331,7 +1331,7 @@ function up2k_init(subtle) {
             if (nil_files.length) {
                 var msg = L.u_blankf.format(nil_files.length, ntot);
                 for (var a = 0, aa = Math.min(20, nil_files.length); a < aa; a++)
    -                msg += '-- ' + nil_files[a][1] + '\n';
    +                msg += '-- ' + esc(nil_files[a][1]) + '\n';
     
                 msg += L.u_just1;
                 return modal.confirm(msg, function () {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.