cve.bz

CVE-2024-6345 pypa pypa/setuptools: Code Injection

8.8 highEPSS 1.9%Fix available

High (8.8) in pypa pypa/setuptools. EPSS 1.9% estimated probability of exploitation activity in the next 30 days. Fixed in setuptools 70.0.0.

On this page
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.

Severity

CVSS 3.0

8.8 high
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
1.9% (unchanged from 1.9% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 81st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-07-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-6345 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-6345?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-6345?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-6345 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
pypa/setuptoolsbefore 70.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-cx63-2mw6-8hw5PyPIsetuptools<70.0.070.0.0
PYSEC-2026-1918PyPIsetuptools<70.0.070.0.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11setuptools52.0.0-4+deb11u1DLA-3876-1
Debian12setuptools66.1.1-1+deb12u1DEBIAN-CVE-2024-6345
Debian13, 14setuptools70.3.0-2DEBIAN-CVE-2024-6345
Ubuntu20.04:LTSsetuptools45.2.0-1ubuntu0.2UBUNTU-CVE-2024-6345 USN-7002-1
Ubuntu22.04:LTSsetuptools59.6.0-1.2ubuntu0.22.04.2UBUNTU-CVE-2024-6345 USN-7002-1
Ubuntu24.04:LTSsetuptools68.1.2-2ubuntu1.1UBUNTU-CVE-2024-6345 USN-7002-1
UbuntuPro:14.04:LTSpython-pip1.5.4-1ubuntu4+esm5UBUNTU-CVE-2024-6345
UbuntuPro:14.04:LTSpython-setuptools3.3-1ubuntu2+esm2UBUNTU-CVE-2024-6345 USN-7002-1
UbuntuPro:16.04:LTSpython-pip8.1.1-2ubuntu0.6+esm8UBUNTU-CVE-2024-6345
UbuntuPro:16.04:LTSpython-setuptools20.7.0-1ubuntu0.1~esm2UBUNTU-CVE-2024-6345 USN-7002-1
UbuntuPro:18.04:LTSpython-pip9.0.1-2.3~ubuntu1.18.04.8+esm4UBUNTU-CVE-2024-6345
UbuntuPro:18.04:LTSpython-setuptools39.0.1-2ubuntu0.1+esm1UBUNTU-CVE-2024-6345 USN-7002-1
UbuntuPro:20.04:LTSpython-pip20.0.2-5ubuntu1.10+esm2UBUNTU-CVE-2024-6345
UbuntuPro:20.04:LTSpython-setuptools44.0.0-2ubuntu0.1+esm1UBUNTU-CVE-2024-6345 USN-7002-1
UbuntuPro:22.04:LTSpython-setuptools44.1.1-1.2ubuntu0.22.04.1+esm1UBUNTU-CVE-2024-6345 USN-7002-1
Red Hatenterprise_linux:8::appstreamPyYAML, python39-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreamfence-agents, fence-agents-all, fence-agents-apc and 45 more0:4.2.1-129.el8_10.4RHSA-2024:6309
Red Hatenterprise_linux:8::appstreammod_wsgi, python39-mod_wsgi0:4.7.1-7.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreamnumpy, python39-numpy, numpy-debugsource and 3 more0:1.19.4-3.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python39-PyMySQL0:0.10.1-2.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-cffi, python39-cffi, python-cffi-debugsource and 1 more0:1.14.3-2.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-chardet, python39-chardet0:3.0.4-19.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-cryptography, python39-cryptography, python-cryptography-debugsource and 1 more0:3.3.1-3.module+el8.10.0+21271+eccd1d86RHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-idna, python39-idna0:2.10-4.module+el8.10.0+21815+bb024982RHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-lxml, python39-lxml, python-lxml-debugsource and 1 more0:4.6.5-1.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-ply, python39-ply0:3.11-10.module+el8.9.0+19644+d68f775dRHSA-2024:5962
Red Hatenterprise_linux:8::appstreampython-psutil, python39-psutil, python-psutil-debugsource and 1 more0:5.8.0-4.module+el8.9.0+19644+d68f775dRHSA-2024:5962
141 more for Red Hat in the JSON and on Red Hat's page.
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy, saltbundlepy-core3.11.9-1.26.1SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-cryptography3.3.2-1.18.1SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-docker7.0.0-1.8.1SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-idna3.4-1.9.2SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-passlib, saltbundlepy-passlib-test1.7.4-1.3.1SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-setuptools67.7.2-1.12.1SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-urllib32.0.7-1.12.1SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Updatesaltbundlepy-zipp3.15.0-1.9.2SUSE-SU-2024:4029-1
SUSEEL-9:Update:Products:SaltBundle:Update, Manager Client Tools for RHEL, Liberty and Clones 9-CLIENT-TOOLSvenv-salt-minion3006.0-1.47.1SUSE-SU-2024:4029-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 1 morepython-setuptools, python-setuptools-test, python-setuptools-wheel40.5.0-150100.6.9.1SUSE-SU-2024:2899-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise Server 15 SP3-LTSS and 1 morepython39-setuptools44.1.1-150300.7.9.1SUSE-SU-2024:2906-1
SUSELinux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise Micro 5.1, Linux Enterprise Micro 5.2 and 2 morepython-setuptools40.5.0-150100.6.9.1SUSE-SU-2024:2899-1
11 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.5python-setuptools67.7.2-150400.3.16.1SUSE-SU-2024:3055-1
openSUSELeap 15.5, Leap 15.6python3-setuptools, python3-setuptools-test, python3-setuptools-wheel44.1.1-150400.9.9.1SUSE-SU-2024:3054-1
openSUSELeap 15.5, Leap 15.6python310-setuptools67.6.1-150400.4.9.1SUSE-SU-2024:2907-1
openSUSELeap 15.5, Leap 15.6python39-setuptools44.1.1-150300.7.9.1SUSE-SU-2024:2906-1
openSUSELeap 15.6python-setuptools, python-setuptools-wheel67.7.2-150400.3.16.1SUSE-SU-2024:3055-1
openSUSELeap 15.6python312-setuptools68.1.2-150600.3.3.1SUSE-SU-2024:2904-1
openSUSELeap Micro 5.5python3-setuptools44.1.1-150400.9.9.1SUSE-SU-2024:3054-1
openSUSETumbleweedpython-setuptools72.1.0-1.1openSUSE-SU-2024:14294-1
AlmaLinux8fence-agents-all, fence-agents-apc, fence-agents-aws and 44 more4.2.1-129.el8_10.4ALSA-2024:6309
AlmaLinux8python3-setuptools, python3-setuptools-wheel, platform-python-setuptools39.2.0-8.el8_10ALSA-2024:5530
AlmaLinux8python3.11-setuptools, python3.11-setuptools-wheel65.5.1-3.el8_10ALSA-2024:5532
AlmaLinux8python3.12-setuptools, python3.12-setuptools-wheel68.2.2-4.el8_10ALSA-2024:5531
AlmaLinux8python39, python39-idle, python39-libs and 5 more3.9.19-7.module_el8.10.0+3885+d986a391ALSA-2024:5962
AlmaLinux8python39-Cython0.29.21-5.module_el8.6.0+2780+a40f65e1ALSA-2024:5962
AlmaLinux8python39-Cython0.29.21-5.module_el8.6.0+3248+c431e88cALSA-2024:5962
AlmaLinux8python39-PyMySQL0.10.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:5962
AlmaLinux8python39-attrs20.3.0-2.module_el8.6.0+2780+a40f65e1ALSA-2024:5962
AlmaLinux8python39-cffi1.14.3-2.module_el8.6.0+2780+a40f65e1ALSA-2024:5962
AlmaLinux8python39-cffi1.14.3-2.module_el8.6.0+3248+c431e88cALSA-2024:5962
AlmaLinux8python39-chardet3.0.4-19.module_el8.6.0+2780+a40f65e1ALSA-2024:5962
38 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.29.21-5.module+el8.10.0+1582+bc278001RLSA-2024:5962
Rocky Linux8Cython0:0.29.21-5.module+el8.10.0+1860+afcc1c71RLSA-2024:5962
Rocky Linux8PyYAML0:5.4.1-1.module+el8.10.0+1582+bc278001RLSA-2024:5962
Rocky Linux8PyYAML0:5.4.1-1.module+el8.10.0+1860+afcc1c71RLSA-2024:5962
Rocky Linux8PyYAML0:5.4.1-1.module+el8.9.0+1418+f0d66789RLSA-2024:5962
Rocky Linux8fence-agents0:4.2.1-129.el8_10.4RLSA-2024:6309
Rocky Linux8mod_wsgi0:4.7.1-7.module+el8.10.0+1582+bc278001RLSA-2024:5962
Rocky Linux8mod_wsgi0:4.7.1-7.module+el8.10.0+1860+afcc1c71RLSA-2024:5962
Rocky Linux8numpy0:1.19.4-3.module+el8.10.0+1582+bc278001RLSA-2024:5962
Rocky Linux8numpy0:1.19.4-3.module+el8.10.0+1860+afcc1c71RLSA-2024:5962
Rocky Linux8pybind110:2.7.1-1.module+el8.9.0+1357+a3b80af7RLSA-2024:5962
Rocky Linux8pytest0:6.0.2-2.module+el8.10.0+1582+bc278001RLSA-2024:5962
39 more for Rocky Linux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

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

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Developer Hub 1.2 on RHEL 9rhdh/rhdh-hub-rhel9:1.2-105Fixed 2024-06-24RHEA-2024:4071
Red Hat Enterprise Linux 7 Extended Lifecycle Supportpython3-setuptools-0:39.2.0-10.el7_9.1Fixed 2024-09-12RHSA-2024:6661
Red Hat Enterprise Linux 7 Extended Lifecycle Supportpython-setuptools-0:0.9.8-7.el7_9.1Fixed 2024-09-13RHSA-2024:6662
Red Hat Enterprise Linux 8python3.12-setuptools-0:68.2.2-4.el8_10Fixed 2024-08-19RHSA-2024:5531
Red Hat Enterprise Linux 8python3.11-setuptools-0:65.5.1-3.el8_10Fixed 2024-08-19RHSA-2024:5532
Red Hat Enterprise Linux 8python39:3.9-8100020240826142629.d47b87a4Fixed 2024-08-28RHSA-2024:5962
Red Hat Enterprise Linux 8python39-devel:3.9-8100020240826142629.d47b87a4Fixed 2024-08-28RHSA-2024:5962
Red Hat Enterprise Linux 8fence-agents-0:4.2.1-129.el8_10.4Fixed 2024-09-04RHSA-2024:6309
Red Hat Enterprise Linux 8resource-agents-0:4.9.0-54.el8_10.4Fixed 2024-09-04RHSA-2024:6311
Red Hat Enterprise Linux 8python-setuptools-0:39.2.0-8.el8_10Fixed 2024-08-19RHSA-2024:5530
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch6-rhel8Not affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/logging-curator5-rhel8Not affected
Multiarch Tuning Operatormultiarch-tuning/multiarch-tuning-rhel9-operatorAffected
Red Hat Ansible Automation Platform 2aap-cloud-metrics-collector-containerNot affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/ee-dellemc-openmanage-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/ee-minimal-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ansible-builder-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ee-cloud-services-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ee-supported-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-rhel8Not affected
139 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-6345.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON