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

Published Jul 15, 2024
·
Updated

A vulnerability in the packageindex 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.

Other sources

A vulnerability in the packageindex 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.

— MITRE

Remote Code Execution in pypa/setuptools

— Microsoft

Affected Software

36 affected componentsFixes available
pip/setuptools<70.0.0
70.0.0
IBM Concert Software<=1.0-3.0.0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
alpine/py3-setuptools<70.3.0-r0
70.3.0-r0
debian/setuptools<66.1.1-1+deb12u1
66.1.1-1+deb12u1
debian/setuptools<70.3.0-2
70.3.0-2
debian/setuptools<70.3.0-2
70.3.0-2
debian/setuptools
66.1.1-1+deb12u278.1.1-0.184.2.0-1
ubuntu/python-pip<1.5.4-1ubuntu4+esm5
1.5.4-1ubuntu4+esm5
ubuntu/python-setuptools<3.3-1ubuntu2+esm2
3.3-1ubuntu2+esm2
ubuntu/python-setuptools<20.7.0-1ubuntu0.1~esm2
20.7.0-1ubuntu0.1~esm2
ubuntu/python-pip<8.1.1-2ubuntu0.6+esm8
8.1.1-2ubuntu0.6+esm8
ubuntu/python-setuptools<39.0.1-2ubuntu0.1+esm1
39.0.1-2ubuntu0.1+esm1
ubuntu/python-pip<9.0.1-2.3~ubuntu1.18.04.8+esm4
9.0.1-2.3~ubuntu1.18.04.8+esm4
ubuntu/setuptools<45.2.0-1ubuntu0.2
45.2.0-1ubuntu0.2
ubuntu/python-pip<20.0.2-5ubuntu1.10+esm2
20.0.2-5ubuntu1.10+esm2
ubuntu/python-setuptools<44.0.0-2ubuntu0.1+esm1
44.0.0-2ubuntu0.1+esm1
ubuntu/setuptools<59.6.0-1.2ubuntu0.22.04.2
59.6.0-1.2ubuntu0.22.04.2
ubuntu/python-setuptools<44.1.1-1.2ubuntu0.22.04.1+esm1
44.1.1-1.2ubuntu0.22.04.1+esm1
ubuntu/setuptools<68.1.2-2ubuntu1.1
68.1.2-2ubuntu1.1
All of the following
azurelinux/python-virtualenv=20.26.6-1
Microsoft CBL-Mariner=2.0
All of the following
azurelinux/python-setuptools<69.0.3-4
69.0.3-4
Microsoft Azure Linux=3.0
All of the following
azurelinux/python3<3.9.19-12
3.9.19-12
Microsoft CBL-Mariner=2.0
All of the following
azurelinux/python-pip<24.2-1
24.2-1
Microsoft Azure Linux=3.0
All of the following
azurelinux/python3.6<0:3.6.15-62.azl4
0:3.6.15-62.azl4
Microsoft Azure Linux=4.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/setuptools to a version that resolves this vulnerability.

    Fixed in 70.0.0
  2. Upgrade

    Upgrade alpine/py3-setuptools to a version that resolves this vulnerability.

    Fixed in 70.3.0-r0
  3. Upgrade

    Upgrade debian/setuptools to a version that resolves this vulnerability.

    Fixed in 66.1.1-1+deb12u1
  4. Upgrade

    Upgrade debian/setuptools to a version that resolves this vulnerability.

    Fixed in 70.3.0-2
  5. Upgrade

    Upgrade debian/setuptools to a version that resolves this vulnerability.

    Fixed in 66.1.1-1+deb12u2Fixed in 78.1.1-0.1Fixed in 84.2.0-1
  6. Upgrade

    Upgrade ubuntu/python-pip to a version that resolves this vulnerability.

    Fixed in 1.5.4-1ubuntu4+esm5
  7. Upgrade

    Upgrade ubuntu/python-setuptools to a version that resolves this vulnerability.

    Fixed in 3.3-1ubuntu2+esm2
  8. Upgrade

    Upgrade ubuntu/python-setuptools to a version that resolves this vulnerability.

    Fixed in 20.7.0-1ubuntu0.1~esm2
  9. Upgrade

    Upgrade ubuntu/python-pip to a version that resolves this vulnerability.

    Fixed in 8.1.1-2ubuntu0.6+esm8
  10. Upgrade

    Upgrade ubuntu/python-setuptools to a version that resolves this vulnerability.

    Fixed in 39.0.1-2ubuntu0.1+esm1
  11. Upgrade

    Upgrade ubuntu/python-pip to a version that resolves this vulnerability.

    Fixed in 9.0.1-2.3~ubuntu1.18.04.8+esm4
  12. Upgrade

    Upgrade ubuntu/setuptools to a version that resolves this vulnerability.

    Fixed in 45.2.0-1ubuntu0.2
  13. Upgrade

    Upgrade ubuntu/python-pip to a version that resolves this vulnerability.

    Fixed in 20.0.2-5ubuntu1.10+esm2
  14. Upgrade

    Upgrade ubuntu/python-setuptools to a version that resolves this vulnerability.

    Fixed in 44.0.0-2ubuntu0.1+esm1
  15. Upgrade

    Upgrade ubuntu/setuptools to a version that resolves this vulnerability.

    Fixed in 59.6.0-1.2ubuntu0.22.04.2
  16. Upgrade

    Upgrade ubuntu/python-setuptools to a version that resolves this vulnerability.

    Fixed in 44.1.1-1.2ubuntu0.22.04.1+esm1
  17. Upgrade

    Upgrade ubuntu/setuptools to a version that resolves this vulnerability.

    Fixed in 68.1.2-2ubuntu1.1
  18. Upgrade

    Upgrade azurelinux/python3 to a version that resolves this vulnerability.

    Fixed in 3.9.19-12
  19. Upgrade

    Upgrade azurelinux/python-setuptools to a version that resolves this vulnerability.

    Fixed in 69.0.3-4
  20. Upgrade

    Upgrade azurelinux/python-pip to a version that resolves this vulnerability.

    Fixed in 24.2-1
  21. Upgrade

    Upgrade azurelinux/python3.6 to a version that resolves this vulnerability.

    Fixed in 0:3.6.15-62.azl4
  22. Upgrade

    Upgrade pypa/setuptools/package_index to a version that resolves this vulnerability.

    Fixed in 70.0

Event History

Jul 15, 2024
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via OSV·01:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·01:15 AM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·01:20 AM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·03:30 AM
Data Sourced
via GitHub·03:30 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·04:25 PM
Oct 15, 2024
Data Sourced
via Microsoft·12:00 AM
DescriptionSeverityWeaknessAffected Software
Apr 30, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
May 2, 2025
Updated
via IBM·12:00 AM
Affected Software
Aug 19, 2025
Updated
via IBM·12:00 AM
DescriptionAffected Software
Sep 22, 2026
Updated
via IBM·12:00 AM
Affected Software
Oct 14, 2026
Updated
via IBM·12:00 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-6345?

CVE-2024-6345 has been rated with a high severity due to its potential for remote code execution.

2

How do I fix CVE-2024-6345?

To mitigate CVE-2024-6345, upgrade the setuptools package to version 70.0.0 or later.

3

Which versions of setuptools are affected by CVE-2024-6345?

CVE-2024-6345 affects setuptools versions up to and including 69.1.1.

4

Is there a specific version of setuptools I should use to avoid CVE-2024-6345?

It is recommended to use setuptools version 70.0.0 or higher to avoid CVE-2024-6345.

5

What is the impact of CVE-2024-6345 on my system?

The impact of CVE-2024-6345 is that it allows an attacker to execute arbitrary code remotely through vulnerable download functions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203