CVE-2024-9287
Last modified
CVE-2024-9287 is a medium-severity vulnerability rated 5.3/10 on the CVSS scale. 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. EPSS estimates a 0.65% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Green
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| 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 |
References
- https://github.com/python/cpython/issues/124651Issue Tracking
- https://github.com/python/cpython/pull/124712Issue Tracking, Patch
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2024-9287?
How severe is CVE-2024-9287?
How do I fix CVE-2024-9287?
Are you affected by CVE-2024-9287?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
