High severity · published Oct 22, 2024
CVE-2024-9287
Virtual environment (venv) activation scripts don't quote paths
7.8
CVSS
0.6%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 51% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CP
CPython · Python Software Foundation
before 3.9.21; 3.10.0 before 3.10.16; 3.11.0 before 3.11.11; 3.12.0 before 3.12.8; 3.13.0 before 3.13.1; 3.14.0a1 before 3.14.0a2 · source: vendor, CISA
PY
Python · Python
before 3.9.21; 3.10.0 before 3.10.16; 3.11.0 before 3.11.11; 3.12.0 before 3.12.8; 3.13.0 before 3.13.1; 3.14.0 · source: NVD