Virtual environment (venv) activation scripts don't quote paths
Summary
| CVE | CVE-2024-9287 |
|---|---|
| State | PUBLISHED |
| Assigner | PSF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2024-10-22 17:15:06 UTC |
| Updated | 2026-10-30 11:17:30 UTC |
| 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. |
Risk And Classification
Primary CVSS: v4.0 5.3 MEDIUM from [email protected]
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
Problem Types: CWE-428 | CWE-77 | CWE-428 CWE-428 Unquoted Search Path or Element
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 5.3 | MEDIUM | 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/C... |
| 4.0 | CNA | CVSS | 5.3 | MEDIUM | 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/U:Green |
| 3.1 | [email protected] | Primary | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v4.0 Breakdown
Attack Vector
LocalAttack Complexity
LowAttack Requirements
PresentPrivileges Required
HighUser Interaction
ActiveConfidentiality
HighIntegrity
HighAvailability
NoneSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS: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
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Python Software Foundation | CPython | affected 3.9.21 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.10.0 3.10.16 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.11.0 3.11.11 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.12.0 3.12.8 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.13.0 3.13.1 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.14.0a1 3.14.0a2 python | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| security.netapp.com/advisory/ntap-20250425-0006 | af854a3a-2127-422b-91ae-364da2661108 | security.netapp.com | |
| github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97 | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8 | [email protected] | github.com | Patch |
| github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b | [email protected] | github.com | Patch |
| lists.debian.org/debian-lts-announce/2024/12/msg00000.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | |
| mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22... | [email protected] | mail.python.org | Vendor Advisory |
| github.com/python/cpython/issues/124651 | [email protected] | github.com | Issue Tracking |
| github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483 | [email protected] | github.com | Patch |
| github.com/python/cpython/pull/124712 | [email protected] | github.com | Issue Tracking, Patch |
| lists.debian.org/debian-lts-announce/2024/11/msg00024.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | |
| github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7 | [email protected] | github.com | Patch |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.