setuptools vulnerable to Command Injection via package URL
The package_index module in setuptools up to version 69.1.1 allows remote code execution through its download functions when they process user-controlled package URLs. An attacker could execute arbitrary commands on the system if these functions are exposed to such inputs.
pypa/setuptools
Originally disclosed on huntr
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.
From the GitHub Advisory Database (GHSA-cx63-2mw6-8hw5, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the download functions in package_index do not properly sanitise user-supplied URLs before using them in system commands, leading to command injection.
Impact
An attacker could execute arbitrary commands on the system if the vulnerable functions are exposed to user-controlled inputs.
What the attacker needed
User-controlled package URL; vulnerable setuptools version
The fix
The issue was fixed in version 70.0.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
setuptools is a tool used to install Python packages. A part of it that downloads packages from web addresses could be tricked into running harmful commands on the computer if someone provides a malicious web address. This means an attacker could take control of the system.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.