Cloudanix VulnDB

CVE-2024-6345

High · 8.8

CVSS

8.8

EPSS

1.9%

Published

Jul 15, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a widely used Python packaging tool could let attackers take over computers when the tool downloads software packages from the internet.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

The vulnerability allows remote code execution through code injection in the package_index module's download functions when processing user-controlled URLs from package indexes or direct inputs.

Why it matters to the business

Attackers could gain full control over build and deployment systems that rely on affected setuptools versions, resulting in supply chain compromises, data theft, and disrupted Python package workflows across development and production environments.

How an attack unfolds

An attacker supplies a crafted malicious URL to the vulnerable download functions in setuptools, which fails to sanitize inputs and executes arbitrary system commands during package retrieval from user-provided or index-sourced locations.

How to fix it

Upgrade pypa/setuptools to the version containing commit 88807c7062788254f654ea8c03427adc859321f0 or later; audit and replace any custom download wrappers that pass unsanitized URLs to these functions.

How to confirm the fix worked

Confirm setuptools version meets or exceeds the fixed commit hash; test package index operations with known malicious URL patterns to ensure no command execution occurs.

Typical attack path

  1. Locate Python environments or scripts using vulnerable setuptools versions for package downloads
  2. Craft a URL containing injected commands targeting the package_index download logic
  3. Trigger the download function via direct API use, pip integration, or custom tooling
  4. Achieve arbitrary command execution on the host system

How to detect it

Inspect build and package manager logs for unexpected command executions or unusual URLs processed during downloads; correlate with process creation events originating from setuptools package_index code.

What your security team should do

  • Prioritize upgrade of setuptools across all build, CI, and runtime environments
  • Review dependencies and lockfiles for pinned vulnerable versions
  • Implement input validation on any package URL handling code
  • Monitor package installation logs for anomalous behavior

The record

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 Introduced Fixed
PyPI setuptools 0 70.0.0
AlmaLinux:8 fence-agents-aliyun 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-all 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-amt-ws 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-apc 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-apc-snmp 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-aws 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-azure-arm 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-bladecenter 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-brocade 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-cisco-mds 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-cisco-ucs 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-common 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-compute 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-drac5 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-eaton-snmp 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-emerson 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-eps 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-gce 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-heuristics-ping 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-hpblade 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ibm-powervs 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ibm-vpc 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ibmblade 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ifmib 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ilo-moonshot 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ilo-mp 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ilo-ssh 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ilo2 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-intelmodular 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ipdu 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-ipmilan 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-kdump 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-kubevirt 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-lpar 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-mpath 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-openstack 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-redfish 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-rhevm 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-rsa 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-rsb 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-sbd 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-scsi 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-virsh 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-vmware-rest 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-vmware-soap 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-wti 0 4.2.1-129.el8_10.4
AlmaLinux:8 fence-agents-zvm 0 4.2.1-129.el8_10.4
AlmaLinux:8 platform-python-setuptools 0 39.2.0-8.el8_10
AlmaLinux:8 python3-setuptools 0 39.2.0-8.el8_10
AlmaLinux:8 python3-setuptools-wheel 0 39.2.0-8.el8_10
AlmaLinux:8 python3.11-setuptools 0 65.5.1-3.el8_10
AlmaLinux:8 python3.11-setuptools-wheel 0 65.5.1-3.el8_10
AlmaLinux:8 python3.12-setuptools 0 68.2.2-4.el8_10
AlmaLinux:8 python3.12-setuptools-wheel 0 68.2.2-4.el8_10
AlmaLinux:8 python39 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-Cython 0 0.29.21-5.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-Cython 0 0.29.21-5.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-PyMySQL 0 0.10.1-2.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-attrs 0 20.3.0-2.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-cffi 0 1.14.3-2.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-cffi 0 1.14.3-2.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-chardet 0 3.0.4-19.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-cryptography 0 3.3.1-3.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-debug 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-devel 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-idle 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-idna 0 2.10-4.module_el8.10.0+3849+a48d89aa
AlmaLinux:8 python39-iniconfig 0 1.1.1-2.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-libs 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-lxml 0 4.6.5-1.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-lxml 0 4.6.5-1.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-mod_wsgi 0 4.7.1-7.module_el8.9.0+3634+fb2a896c
AlmaLinux:8 python39-more-itertools 0 8.5.0-2.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-numpy 0 1.19.4-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-numpy 0 1.19.4-3.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-numpy-doc 0 1.19.4-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-numpy-f2py 0 1.19.4-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-numpy-f2py 0 1.19.4-3.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-packaging 0 20.4-4.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pip 0 20.2.4-9.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-pip-wheel 0 20.2.4-9.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-pluggy 0 0.13.1-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-ply 0 3.11-10.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-psutil 0 5.8.0-4.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-psutil 0 5.8.0-4.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-psycopg2 0 2.8.6-3.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-psycopg2-doc 0 2.8.6-3.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-psycopg2-tests 0 2.8.6-3.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-py 0 1.10.0-1.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pybind11 0 2.7.1-1.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pybind11 0 2.7.1-1.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-pybind11-devel 0 2.7.1-1.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pybind11-devel 0 2.7.1-1.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-pycparser 0 2.20-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pyparsing 0 2.4.7-5.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pysocks 0 1.7.1-4.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pytest 0 6.0.2-2.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pyyaml 0 5.4.1-1.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-pyyaml 0 5.4.1-1.module_el8.6.0+3248+c431e88c
AlmaLinux:8 python39-requests 0 2.25.0-3.module_el8.9.0+3634+fb2a896c
AlmaLinux:8 python39-rpm-macros 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-scipy 0 1.5.4-5.module_el8.9.0+3634+fb2a896c
AlmaLinux:8 python39-setuptools 0 50.3.2-6.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-setuptools-wheel 0 50.3.2-6.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-six 0 1.15.0-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-test 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-tkinter 0 3.9.19-7.module_el8.10.0+3885+d986a391
AlmaLinux:8 python39-toml 0 0.10.1-5.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-urllib3 0 1.25.10-5.module_el8.10.0+3765+2f9a457d
AlmaLinux:8 python39-wcwidth 0 0.2.5-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-wheel 0 1:0.35.1-4.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-wheel-wheel 0 1:0.35.1-4.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 resource-agents 0 4.9.0-54.el8_10.4
AlmaLinux:8 resource-agents-aliyun 0 4.9.0-54.el8_10.4
AlmaLinux:8 resource-agents-gcp 0 4.9.0-54.el8_10.4
AlmaLinux:8 resource-agents-paf 0 4.9.0-54.el8_10.4
AlmaLinux:9 fence-agents-aliyun 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-all 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-amt-ws 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-apc 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-apc-snmp 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-aws 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-azure-arm 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-bladecenter 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-brocade 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-cisco-mds 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-cisco-ucs 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-common 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-compute 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-drac5 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-eaton-snmp 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-emerson 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-eps 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-gce 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-heuristics-ping 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-hpblade 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ibm-powervs 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ibm-vpc 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ibmblade 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ifmib 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ilo-moonshot 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ilo-mp 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ilo-ssh 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ilo2 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-intelmodular 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ipdu 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-ipmilan 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-kdump 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-kubevirt 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-lpar 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-mpath 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-openstack 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-redfish 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-rhevm 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-rsa 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-rsb 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-sbd 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-scsi 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-virsh 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-vmware-rest 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-vmware-soap 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-wti 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-agents-zvm 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virt 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virtd 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virtd-cpg 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virtd-libvirt 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virtd-multicast 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virtd-serial 0 4.10.0-62.el9_4.5
AlmaLinux:9 fence-virtd-tcp 0 4.10.0-62.el9_4.5
AlmaLinux:9 ha-cloud-support 0 4.10.0-62.el9_4.5
AlmaLinux:9 python3-setuptools 0 53.0.0-12.el9_4.1
AlmaLinux:9 python3-setuptools-wheel 0 53.0.0-12.el9_4.1
AlmaLinux:9 python3.11-setuptools 0 65.5.1-2.el9_4.1
AlmaLinux:9 python3.11-setuptools-wheel 0 65.5.1-2.el9_4.1
AlmaLinux:9 python3.12-setuptools 0 68.2.2-3.el9_4.1
AlmaLinux:9 python3.12-setuptools-wheel 0 68.2.2-3.el9_4.1
Alpine:v3.17 py3-setuptools 0 70.3.0-r0
Alpine:v3.18 py3-setuptools 0 70.3.0-r0
Alpine:v3.19 py3-setuptools 0 70.3.0-r0
Alpine:v3.20 py3-setuptools 0 70.3.0-r0
Alpine:v3.21 py3-setuptools 0 70.3.0-r0
Alpine:v3.22 py3-setuptools 0 70.3.0-r0
Bitnami setuptools 0 70.0.0
Chainguard airflow 0 2.9.3-r1
Chainguard airflow-bitnami-compat 0 2.9.3-r1
Chainguard airflow-compat 0 2.9.3-r1
Chainguard az 0 2.62.0-r1
Chainguard az-iamguarded-compat 0 2.62.0-r1
Chainguard checkov 0 3.0.34-r1
Chainguard graalvm-23 0 23.0.2-r7
Chainguard graalvm-23-ce 0 23.0.2-r7
Chainguard graalvm-23-ce-dbg 0 23.0.2-r7
Chainguard graalvm-23-ce-default-jdk 0 23.0.2-r7
Chainguard graalvm-23-ce-jmods 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs-dbg 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs-default-jdk 0 23.0.2-r7
Chainguard graalvm-23-ce-nodejs-jmods 0 23.0.2-r7

Related vulnerabilities