CVE-2025-47273
ADVISORY - githubSummary
Summary
A path traversal vulnerability in PackageIndex
was fixed in setuptools version 78.1.1
Details
def _download_url(self, url, tmpdir):
# Determine download filename
#
name, _fragment = egg_info_for_url(url)
if name:
while '..' in name:
name = name.replace('..', '.').replace('\\', '_')
else:
name = "__downloaded__" # default if URL has no path contents
if name.endswith('.[egg.zip](http://egg.zip/)'):
name = name[:-4] # strip the extra .zip before download
--> filename = os.path.join(tmpdir, name)
os.path.join()
discards the first argument tmpdir
if the second begins with a slash or drive letter.
name
is derived from a URL without sufficient sanitization. While there is some attempt to sanitize by replacing instances of '..' with '.', it is insufficient.
Risk Assessment
As easy_install and package_index are deprecated, the exploitation surface is reduced. However, it seems this could be exploited in a similar fashion like https://github.com/advisories/GHSA-r9hx-vwmv-q579, and as described by POC 4 in https://github.com/advisories/GHSA-cx63-2mw6-8hw5 report: via malicious URLs present on the pages of a package index.
Impact
An attacker would be allowed to write files to arbitrary locations on the filesystem with the permissions of the process running the Python code, which could escalate to RCE depending on the context.
References
https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5 https://github.com/pypa/setuptools/issues/4946
Common Weakness Enumeration (CWE)
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
NIST
2.8
CVSS SCORE
7.7highGitHub
-
CVSS SCORE
7.7highDebian
-
Ubuntu
2.8
CVSS SCORE
8.8mediumPypA
PYSEC-2025-49
2.8
CVSS SCORE
8.8highAlma
-
CVSS SCORE
N/AmediumAlma
-
CVSS SCORE
N/AmediumAlma
-
CVSS SCORE
N/AmediumAlma
-
CVSS SCORE
N/AmediumAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighBitnami
BIT-setuptools-2025-47273
-
CVSS SCORE
7.7highOracle
-
CVSS SCORE
N/AmediumOracle
-
CVSS SCORE
N/AmediumOracle
-
CVSS SCORE
N/AmediumOracle
-
CVSS SCORE
N/AmediumOracle
-
CVSS SCORE
N/AmediumOracle
-
CVSS SCORE
N/AmediumChainguard
CGA-3r32-4gfr-928q
-
Chainguard
CGA-5634-26pj-f5w4
-
Chainguard
CGA-5c5f-r26h-284v
-
Chainguard
CGA-5p8v-8vvm-g54c
-
Chainguard
CGA-5wxh-7pjg-pvm2
-
Chainguard
CGA-992q-7hm3-rgc2
-
Chainguard
CGA-9phc-5c6q-96m2
-
Chainguard
CGA-f5h8-frp9-hrg3
-
Chainguard
CGA-fx9r-fw7x-828q
-
Chainguard
CGA-g4fx-7hpw-64vj
-
Chainguard
CGA-gc4g-p435-r26f
-
Chainguard
CGA-gvf6-q3wf-c4fm
-
Chainguard
CGA-hr67-9f3h-xv87
-
Chainguard
CGA-m64r-j8cp-2jr2
-
Chainguard
CGA-p2x9-4whh-95j4
-
Chainguard
CGA-p5c3-q44p-87f4
-
Chainguard
CGA-p7jj-5j23-cjwc
-
Chainguard
CGA-pcrg-g8j3-7j9r
-
Chainguard
CGA-r8rv-493q-h589
-
Chainguard
CGA-vvv9-2jj9-5qmf
-
Chainguard
CGA-vxvw-x39x-h5qc
-
Photon
CVE-2025-47273
-