setuptools vulnerable to Command Injection via package URLGHSA-cx63-2mw6-8hw5
HIGHFix: pypa/setuptools#4332GHSA-cx63-2mw6-8hw5 is a high-severity (CVSS 8.8) Code Injection vulnerability in setuptools. A fix is available for setuptools — see the affected versions and patch details below.
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.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-cx63-2mw6-8hw5.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-cx63-2mw6-8hw5 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
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
A vulnerability in the package_index module of pypa/setuptools versions up to 69.1.1 allows for remote code execution via its download functions. These functions, which are used to download packages from URLs provided by users or retrieved from package index servers, are susceptible to code injection. If these functions are exposed to user-controlled inputs, such as package URLs, they can execute arbitrary commands on the system. The issue is fixed in version 70.0.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | setuptools | all versions | 70.0.0pip install --upgrade 'setuptools==70.0.0' |
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 70.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-cx63-2mw6-8hw5 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
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 OpenStack does not include setuptools. The ImcSdk component uses it only during compile time in our build systems, and we do not support recompiling SRPMs. As a result, Red Hat OpenStack is not affected by this flaw. Python 2.7.18 was marked End of Life on 04/20/2020. No patches for Python 2 would be made…
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-cx63-2mw6-8hw5 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Developer Hub 1.2 on RHEL 9 | rhdh/rhdh-hub-rhel9:1.2-105 | RHEA-2024:4071 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | python3-setuptools-0:39.2.0-10.el7_9.1 | RHSA-2024:6661 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | python-setuptools-0:0.9.8-7.el7_9.1 | RHSA-2024:6662 |
| Red Hat Enterprise Linux 8 | python3.12-setuptools-0:68.2.2-4.el8_10 | RHSA-2024:5531 |
| Red Hat Enterprise Linux 8 | python3.11-setuptools-0:65.5.1-3.el8_10 | RHSA-2024:5532 |
| Red Hat Enterprise Linux 8 | python39:3.9-8100020240826142629.d47b87a4 | RHSA-2024:5962 |
| Red Hat Enterprise Linux 8 | fence-agents-0:4.2.1-129.el8_10.4 | RHSA-2024:6309 |
| Red Hat Enterprise Linux 8 | resource-agents-0:4.9.0-54.el8_10.4 | RHSA-2024:6311 |
Frequently Asked Questions
Is GHSA-cx63-2mw6-8hw5 in your dependencies?
Find it across PyPI, including transitive dependencies.