Loading advisory.
Loading advisory.
setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write
A path traversal vulnerability in PackageIndex was fixed in setuptools version 78.1.1
Published 2025-05-17 15:46 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| setuptools | PyPI | < 78.1.1 git commits in https://github.com/pypa/setuptools: < 250a6d17978f9f6ac3ac887091f2d32886fbbb0b versions 0.6b1, 0.6b2, 0.6b3, 0.6b4, 0.6c1, 0.6c10, 0.6c11, 0.6c2, 0.6c3, 0.6c4, 0.6c5, 0.6c6, 0.6c7, 0.6c8, 0.6c9, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6 and 583 more | 78.1.1, 250a6d17978f9f6ac3ac887091f2d32886fbbb0b | pip install --upgrade 'setuptools>=78.1.1'pip install --upgrade 'setuptools>=250a6d17978f9f6ac3ac887091f2d32886fbbb0b' |
A path traversal vulnerability in PackageIndex was fixed in setuptools version 78.1.1
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)Here: https://github.com/pypa/setuptools/blob/6ead555c5fb29bc57fe6105b1bffc163f56fd558/setuptools/package_index.py#L810C1-L825C88
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.
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.
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.
https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5 https://github.com/pypa/setuptools/issues/4946
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.016 on 2026-11-24 to 0.019 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.016 | first score | v2026.06.15 |
| 2026-11-26 | 0.019 | 0.016 | v2026.06.15 |