Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI

GHSA-pxfv-7rr3-2qjg

HIGH

copyparty vulnerable to path traversal attack

Also known asCVE-2023-37474PYSEC-2023-127
Published
Jul 14, 2023
Updated
Feb 16, 2025
Affected
1 pkg
Patched
1 / 1
Exploits
1 known

EPSS Exploitation Probability

via FIRST.org ↗
90.2%probability of exploitation in next 30 days
Very High Risk100th percentile+0.24%
89.4%89.8%90.3%90.7%89.9%90.2%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐍copyparty

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

Summary

All versions before 1.8.2 have a path traversal vulnerability, allowing an attacker to download unintended files from the server.

Details

Unauthenticated users were able to retrieve any files which are accessible (according to OS-level permissions) from the copyparty process. Usually, this is all files that are readable by the OS account which is used to run copyparty.

The vulnerability did not make it possible to list the contents of folders, so an attacker needs to know the full absolute path to the file, or the relative path from where copyparty is installed.

Some methods of running copyparty (prisonparty, the nix package, and docker) had a mitigating effect, mostly reducing the attack scope to files inside copyparty volumes, and possibly the copyparty config file.

Checking for attacks

Please keep in mind that, if an attacker were to find a way to overwrite the logs, for example by discovering the password to another service with sufficient privileges, then the following approaches cannot be trusted.

if copyparty was only accessible through a reverse proxy, then all attacks would be visible in the webserver access-log as URLs which contain both .cpr/ and %2F

  • nginx:
    (gzip -dc access.log*.gz; cat access.log) | sed -r 's/" [0-9]+ .*//' | grep -E 'cpr/.*%2[^0]' | grep -vF data:image/svg
    

However, if copyparty was directly accessible from the internet, then any successful attacks (file retrievals) would unfortunately leave no trace. That said, it is very probable that an attacker would make at least one invalid attempt, which would become apparent in the copyparty server log, detectable with grep -aE '(Errno|Permission).*\.cpr/' revealing the following:

  • python2 example: [IOError] [Errno 13] Permission denied: '/etc/shadow', .cpr//etc/shadow
  • python3 example: [PermissionError] [Errno 13] Permission denied: b'/etc/shadow', .cpr//etc/shadow

Providing an exact command for this approach is difficult, as it depends on how copyparty is deployed;

  • if copyparty was running as a systemd service: journalctl -am | grep -aE '(Errno|Permission).*\.cpr/'
  • if copyparty was logging to a compressed file: xz -kdc thefilename.xz | grep -aE '(Errno|Permission).*\.cpr/'
  • if the copyparty log is available in a plaintext file: grep -aE '(Errno|Permission).*\.cpr/' thefilename.txt

PoC / attack example

curl -sik http://127.0.0.1:3923/.cpr/%2Fetc%2Fpasswd
curl -sik http://127.0.0.1:3923/.cpr/..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIcopypartyall versions1.8.2
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Frequently Asked Questions

# Summary All versions before 1.8.2 have a path traversal vulnerability, allowing an attacker to download unintended files from the server. # Details Unauthenticated users were able to retrieve any files which are accessible (according to OS-level permissions) from the copyparty process. Usually, this is all files that are readable by the OS account which is used to run copyparty. The vulnerability did not make it possible to list the contents of folders, so an attacker needs to know the full absolute path to the file, or the relative path from where copyparty is installed. Some methods of
O3 Security · Impact-Aware SCA

Is GHSA-pxfv-7rr3-2qjg in your stack?

O3 detects GHSA-pxfv-7rr3-2qjg across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.