CVE-2024-9287
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.
Published Updated Sources: cvelistV5, PSF
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
1%
chance of exploitation in 30 days
CVSS base
5.3
MEDIUM
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Total
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (2)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 5.3 | CVSS 4.0 | MEDIUM | — | — | cvelistV5 |
Weakness & attack patterns
- CWE-428
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /bin/activate, /venv/bin/python.
References
12 on the record
- github.com/python/cpython/issues/124651
issue-tracking
- github.com/python/cpython/pull/124712
patch
- mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/
vendor-advisory
- github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483
patch
- github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7
patch
- github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db
patch
- github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8
patch
- github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97
patch
Elsewhere on this site
- python software foundationevery CVE for this vendor
- pythonevery CVE for this vendor
- CWE-428other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.