CVE-2024-9287: Virtual environment (venv) activation scripts don't quote paths
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.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2024-9287?
CVE-2024-9287 has been classified as a high-severity vulnerability due to the potential for command injection.
How do I fix CVE-2024-9287?
To remediate CVE-2024-9287, update to the latest version of Python that addresses this vulnerability.
Which versions of Python are affected by CVE-2024-9287?
CVE-2024-9287 affects multiple versions of Python including versions prior to 3.10.17, 3.11.11, 3.12.8, and 3.13.1.
What type of vulnerability is CVE-2024-9287?
CVE-2024-9287 is a command injection vulnerability due to improper quoting of path names in the CPython venv module.
How can I verify if my system is vulnerable to CVE-2024-9287?
You can verify your vulnerability by checking the version of Python installed on your system and comparing it to the affected versions of CVE-2024-9287.