CVE-2024-9287
22.10.2024, 17:15
A vulnerability has been found in the CPython `venv` module and CLI where path names provided when creating a virtual environment were not quoted properly, allowing the creator to inject commands into virtual environment "activation" scripts (ie "source venv/bin/activate"). This means that attacker-controlled virtual environments are able to run commands when the virtual environment is activated. Virtual environments which are not created by an attacker or which aren't activated before being used (ie "./venv/bin/python") are not affected.
Vendor | Product | Version |
---|---|---|
python | python | 𝑥 < 3.9.21 |
python | python | 3.10.0 ≤ 𝑥 < 3.10.16 |
python | python | 3.11.0 ≤ 𝑥 < 3.11.11 |
python | python | 3.12.0 ≤ 𝑥 < 3.12.8 |
python | python | 3.13.0 ≤ 𝑥 < 3.13.1 |
python | python | 3.14.0:alpha1 |
𝑥
= Vulnerable software versions

Debian Releases
Debian Product | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
pypy3 |
| ||||||||||
python2.7 |
| ||||||||||
python3.11 |
| ||||||||||
python3.12 |
| ||||||||||
python3.13 |
| ||||||||||
python3.9 |
|

Ubuntu Releases
Ubuntu Product | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
python2.7 |
| ||||||||||||||||
python3.10 |
| ||||||||||||||||
python3.11 |
| ||||||||||||||||
python3.12 |
| ||||||||||||||||
python3.13 |
| ||||||||||||||||
python3.4 |
| ||||||||||||||||
python3.5 |
| ||||||||||||||||
python3.6 |
| ||||||||||||||||
python3.7 |
| ||||||||||||||||
python3.8 |
| ||||||||||||||||
python3.9 |
|
Common Weakness Enumeration
- CWE-428 - Unquoted Search Path or ElementThe product uses a search path that contains an unquoted element, in which the element contains whitespace or other separators. This can cause the product to access resources in a parent path.
- CWE-77 - Improper Neutralization of Special Elements used in a Command ('Command Injection')The software constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
References