NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File WriteGHSA-5rjg-fvgr-3xxf

Fix: pypa/setuptools@250a6d1

GHSA-5rjg-fvgr-3xxf is a Path Traversal vulnerability in setuptools. A fix is available for setuptools — see the affected versions and patch details below.

Also known asBIT-setuptools-2025-47273CVE-2025-47273PYSEC-2025-49
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs76th percentile — riskier than 76% of all scored CVEsHighest risk
0.00%0.70%1.39%2.09%0.5%1.6%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍setuptools

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

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)

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.

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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIsetuptoolsall versions78.1.1pip install --upgrade 'setuptools==78.1.1'

Affected Products

2 products · 2 configurations
OS
debian linuxdebian
1 version
11.0
Application
setuptoolspython
< 78.1.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. 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.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

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 HatModerate

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…

Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Source: Red Hat security advisory for GHSA-5rjg-fvgr-3xxf (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Ansible Automation Platform 2.5 for RHEL 8automation-controller-0:4.6.19-1.el8apRHSA-2025:14686
Red Hat Enterprise Linux 10python-setuptools-0:69.0.3-12.el10_0RHSA-2025:9940
Red Hat Enterprise Linux 7 Extended Lifecycle Supportpython3-setuptools-0:39.2.0-10.el7_9.2RHSA-2025:11607
Red Hat Enterprise Linux 7 Extended Lifecycle Supportpython-setuptools-0:0.9.8-7.el7_9.2RHSA-2025:11984
Red Hat Enterprise Linux 8python3.11-setuptools-0:65.5.1-4.el8_10RHSA-2025:11043
Red Hat Enterprise Linux 8python3.12-setuptools-0:68.2.2-5.el8_10RHSA-2025:11044
Red Hat Enterprise Linux 8python39:3.9-8100020250823160619.d47b87a4RHSA-2025:14900
Red Hat Enterprise Linux 8python-setuptools-0:39.2.0-9.el8_10RHSA-2025:11036

Frequently Asked Questions

### 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 --> f
O3 Security · Impact-Aware SCA

Is GHSA-5rjg-fvgr-3xxf in your dependencies?

Find it across PyPI, including transitive dependencies.

setuptools has a path traversal vulnerability in…