Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-6345: CWE-94 Improper Control of Generation of Code in pypa pypa/setuptools

0
High
VulnerabilityCVE-2024-6345cvecve-2024-6345cwe-94
Published: Mon Jul 15 2024 (07/15/2024, 00:00:14 UTC)
Source: CVE Database V5
Vendor/Project: pypa
Product: pypa/setuptools

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.

AI-Powered Analysis

AILast updated: 11/04/2025, 16:52:32 UTC

Technical Analysis

CVE-2024-6345 is a vulnerability classified under CWE-94 (Improper Control of Generation of Code) found in the pypa/setuptools package, a widely used Python package management tool. The flaw exists in the package_index module's download functions, which are responsible for fetching packages from URLs either provided directly by users or retrieved from package index servers. These functions fail to properly sanitize or validate the URLs, allowing an attacker to inject malicious code that gets executed on the host system. This remote code execution (RCE) vulnerability can be triggered without requiring authentication but does require user interaction, such as initiating a package installation or update process that involves a crafted URL. The vulnerability affects all setuptools versions up to 69.1.1 and has been addressed in version 70.0. The CVSS v3.0 score of 8.8 reflects the high impact on confidentiality, integrity, and availability, combined with the ease of exploitation due to network vector and low attack complexity. Although no exploits are currently known in the wild, the critical nature of setuptools in Python environments and its integration in development and deployment pipelines makes this vulnerability a significant threat. Attackers exploiting this flaw could execute arbitrary commands, potentially leading to full system compromise, data theft, or disruption of services.

Potential Impact

For European organizations, the impact of CVE-2024-6345 can be severe. Many enterprises, research institutions, and government agencies rely heavily on Python for software development, automation, and data analysis. The setuptools package is a fundamental tool in Python package management, often used in CI/CD pipelines, automated deployments, and development environments. Exploitation could lead to unauthorized code execution on build servers, developer workstations, or production systems, resulting in data breaches, insertion of malicious code into software supply chains, or disruption of critical services. The compromise of development infrastructure could also facilitate further attacks, including lateral movement within networks and persistence. Given the interconnected nature of European IT ecosystems and the reliance on open-source software, this vulnerability poses a systemic risk that could affect multiple sectors including finance, healthcare, manufacturing, and public administration.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should immediately upgrade all instances of pypa/setuptools to version 70.0 or later, where the issue is fixed. Additionally, organizations should audit and restrict the sources of package URLs used in automated scripts, CI/CD pipelines, and manual installations to trusted repositories only. Implementing strict input validation and sanitization on any user-supplied URLs related to package downloads is critical to prevent injection attacks. Monitoring and logging package installation activities can help detect suspicious behavior early. Organizations should also consider isolating build and deployment environments to limit the impact of potential exploitation. Regularly updating all Python dependencies and educating developers about secure package management practices will further reduce risk. Finally, integrating security scanning tools that detect vulnerable dependencies can help maintain ongoing security hygiene.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
@huntr_ai
Date Reserved
2024-06-26T08:16:17.895Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 690a2dfef0ba78a050538c81

Added to database: 11/4/2025, 4:46:54 PM

Last enriched: 11/4/2025, 4:52:32 PM

Last updated: 11/5/2025, 1:49:34 PM

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats