CVE-2024-9287 Details
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.
A vulnerability exists in the CPython venv module and command-line interface, where path names used to create virtual environments were not properly quoted. This flaw allows the creator to inject commands into the virtual environment's activation scripts. As a result, virtual environments controlled by an attacker can execute commands when activated. However, environments not created by an attacker or those not activated before use are not affected.
Users can upgrade to CPython versions 3.9.25, 3.10.21, 3.11.16, 3.12.14, or 3.15.0rc2, all of which include the necessary fix. Instructions for downloading these versions are available on the official Python website.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 23, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | [email protected] |
| CWE-428 | Unquoted Search Path or Element | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| python python | < 3.9.21 >= 3.10.0, < 3.10.16 >= 3.11.0, < 3.11.11 >= 3.12.0, < 3.12.8 >= 3.13.0, < 3.13.1 3.14.0 alpha1 |
CPE
Remediation
| |
Change History
12 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 30, 2026 | CVE Modified | [email protected] |
| Oct 30, 2026 | CVE Modified | CISA-ADP |
| Oct 30, 2026 | CVE Modified | CVE |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 3, 2025 | CVE Modified | CVE |
| Apr 25, 2025 | CVE Modified | CVE |
| Feb 10, 2025 | Initial Analysis | [email protected] |
| Jan 31, 2025 | CVE Modified | [email protected] |
| Nov 4, 2024 | CVE Modified | [email protected] |
| Oct 30, 2024 | CVE Modified | [email protected] |
| Oct 22, 2024 | New CVE Received | [email protected] |