CVE-2024-9287: Virtual environment (venv) activation scripts don't quote paths
Vulnerability summary
CVE-2024-9287 is a high (CVSS 7.8) Unquoted Search Path or Element vulnerability in python software foundation cpython. EPSS estimates a 0.65% chance of exploitation in the next 30 days, higher than 51.1% of scored vulnerabilities.
Not severe (CVSS 5.3, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 18 · Related 12Timeline
- 22-10-2024PublishedVulnerability first disclosed.
- 30-10-2026Last modifiedVulnerability information updated.
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 metrics
10 scores · 8 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS: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
- OSV · WolfiEcosystem advisory · calculated5.3MediumCVSS: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
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS: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
- NVDNIST5.3MediumCVSS: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
- OSV · AlpineEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · Red hatEcosystem advisory · calculated6.3MediumCVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:NDiffers
- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.65%
Chance of exploitation in the next 30 days
Percentile
51%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.65% on 05-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-428Unquoted Search Path or ElementThe product uses a search path that contains an unquoted element, in which the element contains whitespace or other separators. This can cause the product to access resources in a parent path.
- CWE-77Improper Neutralization of Special Elements used in a CommandThe product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Affected systems
Known conditions: local access, administrative account, user interaction (CVSS vector). Other conditions: not stated in public data.
Opensuse35 products
- python-virtualenv&distro=openSUSE Tumbleweed< 20.26.6-1.1
- python3-core&distro=openSUSE Leap 15.5< 3.6.15-150300.10.75.1
- python3-core&distro=openSUSE Leap 15.6< 3.6.15-150300.10.75.1
- python3-core&distro=openSUSE Leap Micro 5.5< 3.6.15-150300.10.75.1
- python3-documentation&distro=openSUSE Leap 15.5< 3.6.15-150300.10.75.1
Suse32 products
- python3-base&distro=SUSE Linux Enterprise Server LTSS Extended Security 12 SP5< 3.4.10-25.142.1
- python3-core&distro=SUSE Linux Enterprise Micro 5.1< 3.6.15-150000.3.164.1
- python3-core&distro=SUSE Linux Enterprise Micro 5.2< 3.6.15-150300.10.75.1
- python3-core&distro=SUSE Linux Enterprise Micro 5.3< 3.6.15-150300.10.75.1
- python3-core&distro=SUSE Linux Enterprise Micro 5.4< 3.6.15-150300.10.75.1
Redhat21 products
- python-unversioned-command< 0:3.9.18-3.el9_4.7
- python3< 0:3.9.18-3.el9_4.7
- python3-debug< 0:3.9.18-3.el9_4.7
- python3-devel< 0:3.9.18-3.el9_4.7
- python3-idle< 0:3.9.18-3.el9_4.7
Ubuntu9 products
- python3.10< 3.10.12-1~22.04.7
- python3.11< 3.11.0~rc1-1~22.04.1~esm2
- python3.12< 3.12.3-1ubuntu0.3
- python3.4< 3.4.3-1ubuntu1~14.04.7+esm14
- python3.5< 3.5.2-2ubuntu0~16.04.4~14.04.1+esm4 | < 3.5.2-2ubuntu0~16.04.13+esm16
Chainguard5 products
- python-3.10< 3.10.15-r3
- python-3.11< 3.11.10-r4
- python-3.12< 3.12.7-r1
- python-3.13< 3.13.0-r1
- python-3.9< 3.9.20-r3
Wolfi4 products
- python-3.10< 3.10.15-r3
- python-3.11< 3.11.10-r4
- python-3.12< 3.12.7-r1
- python-3.13< 3.13.0-r1
Debian3 products
- pypy3< 7.3.11+dfsg-2+deb12u3 | < 7.3.17+dfsg-3
- python3.11< 3.11.2-6+deb12u5
- python3.13< 3.13.1-1
Alpine1 product
- python3< 3.11.11-r0 | < 3.12.8-r0
Python1 product
- 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
Python software foundation1 product
- cpython< 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.0a1, < 3.14.0a2
10 vendors · 112 products
References
52 links- mail.python.org/archives/list/security-announce@python.org/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/Vendor AdvisoryARTICLEREPORTAdvisory
Show all 52 references
- github.com/python/cpythonPACKAGE
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory