GHSA-5rjg-fvgr-3xxf — setuptools
Fix: pypa/setuptools@250a6d1GHSA-5rjg-fvgr-3xxf is a Path Traversal vulnerability in setuptools. A fix is available for setuptools — see the affected versions and patch details below.
setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-5rjg-fvgr-3xxf.
EPSS Exploitation Probability
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.
Real-World Exposure
setuptoolsReal-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
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | setuptools | all versions | 78.1.1pip install --upgrade 'setuptools==78.1.1' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for setuptools, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update setuptools to 78.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5rjg-fvgr-3xxf is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-5rjg-fvgr-3xxf can be triaged on real exposure rather than presence alone.
Tailored to GHSA-5rjg-fvgr-3xxf. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Product Security has rated this vulnerability "Moderate" based on the impact of the damage caused by a successful exploitation and the pre-requisites. * Exploitation requires that the attacker have limited code execution access to a Python environment where they can trigger the vulnerable…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | automation-controller-0:4.6.19-1.el8ap | RHSA-2025:14686 |
| Red Hat Enterprise Linux 10 | python-setuptools-0:69.0.3-12.el10_0 | RHSA-2025:9940 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | python3-setuptools-0:39.2.0-10.el7_9.2 | RHSA-2025:11607 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | python-setuptools-0:0.9.8-7.el7_9.2 | RHSA-2025:11984 |
| Red Hat Enterprise Linux 8 | python3.11-setuptools-0:65.5.1-4.el8_10 | RHSA-2025:11043 |
| Red Hat Enterprise Linux 8 | python3.12-setuptools-0:68.2.2-5.el8_10 | RHSA-2025:11044 |
| Red Hat Enterprise Linux 8 | python39:3.9-8100020250823160619.d47b87a4 | RHSA-2025:14900 |
| Red Hat Enterprise Linux 8 | python-setuptools-0:39.2.0-9.el8_10 | RHSA-2025:11036 |
Frequently Asked Questions
Is GHSA-5rjg-fvgr-3xxf in your dependencies?
O3 Security finds GHSA-5rjg-fvgr-3xxf across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.