CVE-2024-9287: Python Software Foundation CPython · Unquoted Search Path or Element
Affects Python Software Foundation CPythonSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium.
Data as of 30 Oct 2026, 02:27 UTC
Thin evidence
One scorer or none| CNA (PSF) | CVSS 4.0 | 5.3 |
|---|
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:GreenExploitation evidence
Disclosed: evidence found.
CVE published 22 Oct 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Python Software Foundation CPython | Affected
| Fixed in– |
AI-suggested
Users should avoid activating virtual environments created by untrusted sources. Using the Python interpreter directly from the virtual environment without activating it (e.g., './venv/bin/python') avoids the risk. Monitor the Python Software Foundation advisories for updates and patches addressing this issue.
Description
CVE-2024-9287 is a medium severity vulnerability in the Python Software Foundation's CPython implementation affecting the venv module and CLI. It arises from unquoted path names when creating virtual environments, allowing attacker-controlled virtual environments to inject commands into activation scripts. This can lead to execution of arbitrary commands when the virtual environment is activated using 'source venv/bin/activate'. Virtual environments not created by an attacker or those used without activation (e.g., running './venv/bin/python' directly) are not affected.
References
- github.com/python/cpython/issues/124651 (opens in a new tab)
- github.com/python/cpython/pull/124712 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/ (opens in a new tab)
- github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483 (opens in a new tab)
- github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7 (opens in a new tab)
- github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db (opens in a new tab)
- github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8 (opens in a new tab)
- github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97 (opens in a new tab)
- github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b (opens in a new tab)
- security.netapp.com/advisory/ntap-20250425-0006/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/12/msg00000.html (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/11/msg00024.html (opens in a new tab)