Cloudanix VulnDB

CVE-2025-47273

None

setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write

CVSS

—

EPSS

1.6%

Published

May 19, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a widely used Python packaging tool could let attackers reach files they should not be able to touch when software is downloaded from certain sources.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Path traversal in PackageIndex allows crafted index URLs or package metadata to escape the intended directory and access arbitrary filesystem paths during package resolution or download operations.

Why it matters to the business

Attackers could read or overwrite files on systems that use setuptools to fetch packages from untrusted indexes, risking exposure of credentials, source code, or configuration and potential supply-chain tampering in Python environments.

How an attack unfolds

An attacker hosts or proxies a malicious package index containing path traversal sequences such as '../' in filenames or URLs; when setuptools processes the index, the traversal bypasses directory restrictions and permits reading or writing outside the cache or staging area.

How to fix it

Upgrade pypa/setuptools to version 78.1.1 or later; the vulnerability is resolved in commit 8e4868a036b7fae3208d16cb4e5fe6d63c3752df. Pin the package manager in build and CI environments and avoid fetching packages from untrusted indexes.

How to confirm the fix worked

Confirm setuptools version is 78.1.1 or newer via 'python -m pip show setuptools'; test PackageIndex handling with known traversal payloads in a controlled environment and verify no files are accessed outside the expected directories.

Typical attack path

  1. Identify or compromise a package index reachable by the target environment
  2. Craft index responses containing relative path sequences in package metadata or file names
  3. Trigger package resolution or installation via pip/setuptools against the malicious index
  4. Traverse to sensitive paths to read secrets or plant malicious files
  5. Achieve persistence or escalate via the modified filesystem artifacts

How to detect it

Review package installation logs for unexpected file paths containing '..' sequences during index processing; inspect setuptools cache directories for anomalous entries created around installation timestamps; correlate with network logs showing requests to untrusted index hosts.

What your security team should do

  • Immediately upgrade all setuptools instances to 78.1.1 or the referenced commit
  • Audit Python build pipelines and dependency resolvers for use of custom or third-party indexes
  • Implement least-privilege filesystem access for package installation processes
  • Monitor EPSS trend and re-evaluate if exploit maturity increases

The record

A path traversal vulnerability in `PackageIndex` was fixed in setuptools version 78.1.1

Affected packages

Ecosystem Package Introduced Fixed
PyPI setuptools 0 250a6d17978f9f6ac3ac887091f2d32886fbbb0b
PyPI setuptools 0 78.1.1
AlmaLinux:10 python3-setuptools 0 69.0.3-12.el10_0
AlmaLinux:10 python3-setuptools-wheel 0 69.0.3-12.el10_0
AlmaLinux:8 platform-python-setuptools 0 39.2.0-9.el8_10
AlmaLinux:8 python3-setuptools 0 39.2.0-9.el8_10
AlmaLinux:8 python3-setuptools-wheel 0 39.2.0-9.el8_10
AlmaLinux:8 python3.11-setuptools 0 65.5.1-4.el8_10
AlmaLinux:8 python3.11-setuptools-wheel 0 65.5.1-4.el8_10
AlmaLinux:8 python3.12-setuptools-wheel 0 68.2.2-5.el8_10
AlmaLinux:8 python39 0 3.9.20-2.module_el8.10.0+4040+9207bbc0
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.20-2.module_el8.10.0+4040+9207bbc0
AlmaLinux:8 python39-devel 0 3.9.20-2.module_el8.10.0+4040+9207bbc0
AlmaLinux:8 python39-idle 0 3.9.20-2.module_el8.10.0+4040+9207bbc0
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.20-2.module_el8.10.0+4040+9207bbc0
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.10.0+3989+a618fe15.1
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.20-2.module_el8.10.0+4040+9207bbc0
AlmaLinux:8 python39-scipy 0 1.5.4-5.module_el8.9.0+3634+fb2a896c
AlmaLinux:8 python39-setuptools 0 50.3.2-7.module_el8.10.0+4040+9207bbc0
AlmaLinux:8 python39-setuptools-wheel 0 50.3.2-7.module_el8.10.0+4040+9207bbc0
AlmaLinux:8 python39-six 0 1.15.0-3.module_el8.6.0+2780+a40f65e1
AlmaLinux:8 python39-test 0 3.9.20-2.module_el8.10.0+4040+9207bbc0
AlmaLinux:8 python39-tkinter 0 3.9.20-2.module_el8.10.0+4040+9207bbc0
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:9 fence-agents-aliyun 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-all 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-amt-ws 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-apc 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-apc-snmp 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-aws 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-azure-arm 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-bladecenter 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-brocade 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-cisco-mds 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-cisco-ucs 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-common 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-compute 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-drac5 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-eaton-snmp 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-emerson 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-eps 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-gce 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-heuristics-ping 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-hpblade 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ibm-powervs 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ibm-vpc 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ibmblade 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ifmib 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ilo-moonshot 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ilo-mp 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ilo-ssh 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ilo2 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-intelmodular 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ipdu 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-ipmilan 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-kdump 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-kubevirt 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-lpar 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-mpath 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-openstack 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-redfish 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-rhevm 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-rsa 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-rsb 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-sbd 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-scsi 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-virsh 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-vmware-rest 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-vmware-soap 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-wti 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-agents-zvm 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virt 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virtd 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virtd-cpg 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virtd-libvirt 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virtd-multicast 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virtd-serial 0 4.10.0-86.el9_6.7
AlmaLinux:9 fence-virtd-tcp 0 4.10.0-86.el9_6.7
AlmaLinux:9 ha-cloud-support 0 4.10.0-86.el9_6.7
AlmaLinux:9 python3-setuptools 0 53.0.0-13.el9_6.1
AlmaLinux:9 python3-setuptools-wheel 0 53.0.0-13.el9_6.1
AlmaLinux:9 python3.11-setuptools 0 65.5.1-4.el9_6
AlmaLinux:9 python3.11-setuptools-wheel 0 65.5.1-4.el9_6
AlmaLinux:9 python3.12-setuptools 0 68.2.2-5.el9_6
AlmaLinux:9 python3.12-setuptools-wheel 0 68.2.2-5.el9_6
Bitnami setuptools 0 78.1.1
Chainguard ansible-operator 0 1.42.0-r3
Chainguard ansible-operator-compat 0 1.41.0-r1
Chainguard ansible-operator-fips 0 1.42.0-r2
Chainguard aws-cli-2 0 2.27.60-r1
Chainguard aws-cli-2-iamguarded-compat 0 2.27.60-r1
Chainguard awx 0 0
Chainguard azure-functions-host 0 4.1045.100-r0
Chainguard azure-functions-host-compat 0 4.1045.100-r0
Chainguard azure-functions-host-nodejs-worker 0 4.1045.100-r0
Chainguard azure-functions-host-python3.11-worker 0 4.1046.100-r0
Chainguard azure-functions-host-python3.12-worker 0 4.1046.100-r0
Chainguard azure-functions-host-python3.13-worker 0 4.1046.100-r0
Chainguard checkov 0 3.2.432-r0
Chainguard dask-gateway 0 2025.4.0-r6
Chainguard dask-gateway 0 2025.4.0-r7
Chainguard dask-gateway-server 0 2025.4.0-r6
Chainguard dask-gateway-server 0 2025.4.0-r7
Chainguard datadog-agent 0 0
Chainguard datadog-agent-7.71 0 0
Chainguard datadog-agent-7.71-core-integrations 0 0
Chainguard datadog-agent-7.71-fakeintake 0 0
Chainguard datadog-agent-7.71-jmx 0 7.71.2-r4
Chainguard datadog-agent-7.71-oci-compat 0 7.71.2-r4
Chainguard datadog-agent-7.71-s6-overlay 0 0
Chainguard datadog-agent-7.72 0 0
Chainguard datadog-agent-7.72-core-integrations 0 0
Chainguard datadog-agent-7.72-fakeintake 0 0
Chainguard datadog-agent-7.72-jmx 0 0
Chainguard datadog-agent-7.72-oci-compat 0 0
Chainguard datadog-agent-7.72-s6-overlay 0 0
Chainguard datadog-agent-7.73 0 7.73.2-r0
Chainguard datadog-agent-7.73-core-integrations 0 7.73.2-r0
Chainguard datadog-agent-7.73-fakeintake 0 7.73.2-r0
Chainguard datadog-agent-7.73-jmx 0 7.73.1-r0
Chainguard datadog-agent-7.73-oci-compat 0 7.73.1-r0
Chainguard datadog-agent-7.73-s6-overlay 0 7.73.2-r0
Chainguard datadog-agent-core-integrations 0 0
Chainguard datadog-agent-core-integrations-fips 0 0
Chainguard datadog-agent-fakeintake 0 0
Chainguard datadog-agent-fakeintake-fips 0 0
Chainguard datadog-agent-fips 0 0
Chainguard datadog-agent-fips-7.71 0 0
Chainguard datadog-agent-fips-7.71-core-integrations 0 0
Chainguard datadog-agent-fips-7.71-fakeintake 0 0
Chainguard datadog-agent-fips-7.71-jmx 0 7.71.2-r3
Chainguard datadog-agent-fips-7.71-oci-compat 0 7.71.2-r3
Chainguard datadog-agent-fips-7.71-s6-overlay 0 0
Chainguard datadog-agent-fips-7.72 0 0
Chainguard datadog-agent-fips-7.72-core-integrations 0 0
Chainguard datadog-agent-fips-7.72-fakeintake 0 0
Chainguard datadog-agent-fips-7.72-jmx 0 0
Chainguard datadog-agent-fips-7.72-oci-compat 0 0
Chainguard datadog-agent-fips-7.72-s6-overlay 0 0
Chainguard datadog-agent-fips-7.73 0 7.73.2-r0
Chainguard datadog-agent-fips-7.73-core-integrations 0 7.73.2-r0
Chainguard datadog-agent-fips-7.73-fakeintake 0 7.73.2-r0
Chainguard datadog-agent-fips-7.73-jmx 0 7.73.2-r0
Chainguard datadog-agent-fips-7.73-oci-compat 0 7.73.2-r0
Chainguard datadog-agent-fips-7.73-s6-overlay 0 7.73.2-r0
Chainguard datadog-agent-jmx 0 0
Chainguard datadog-agent-jmx-fips 0 0
Chainguard datadog-agent-oci-compat 0 0
Chainguard datadog-agent-oci-compat-fips 0 0
Chainguard datadog-agent-s6-overlay 0 0
Chainguard datadog-agent-s6-overlay-fips 0 0
Chainguard datadog-cluster-agent 0 0
Chainguard datadog-cluster-agent-7.71 0 7.71.2-r4
Chainguard datadog-cluster-agent-7.71-oci-compat 0 7.71.2-r4
Chainguard datadog-cluster-agent-7.72 0 0
Chainguard datadog-cluster-agent-7.72-oci-compat 0 0

Related vulnerabilities