Security Resilience

CVE-2024-9287

Command Injection in Python ≤ 3.9.21

Published
22 October 2024
Modified
30 October 2026
Patch / advisory
CVSS Score v4 5.3
Click a component to see what it means
Raw vectorCVSS: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
EPSS Score 0.0065 52th percentile
Risk Priority 35 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-9287 is a medium-severity Unquoted Search Path or Element (CWE-428) vulnerability in Python. Its CVSS base score is 5.3 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 48% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1574 Hijack Execution Flow Stealth
Adversaries may execute their own malicious payloads by hijacking the way operating systems run programs.
T1574.009 Path Interception by Unquoted Path Stealth
Adversaries may execute their own malicious payloads by hijacking vulnerable file path references.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-4519Same product: Python Python
CVE-2023-33595Same product: Python Python
CVE-2026-6019Same product: Python Python
CVE-2026-4224Same product: Python Python
CVE-2026-7210Same product: Python Python
CVE-2025-6075Same product: Python Python
CVE-2025-12084Same product: Python Python
CVE-2026-0864Same product: Python Python
CVE-2023-38898Same product: Python Python
CVE-2025-13462Same product: Python Python

Affected Assets

python
python
3.14.0 · ≤ 3.9.21 · 3.10.0 — 3.10.16 · 3.11.0 — 3.11.11

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing and evaluation can discover unquoted search paths through static analysis or dynamic test cases.

Input validation directly stops construction of commands from untrusted data containing special elements.

Documented development standards and tools can mandate proper quoting and escaping of path elements.

Engineering principles can require safe construction and quoting of search paths and command elements.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly prevent path-handling flaws such as unquoted elements during development.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development can detect unquoted search-path issues before deployment.

finds

A.5.22 monitors supplier service delivery, reviews audit reports and manages supplier relationships; it does not inspect code, exercise software at runtime, or scan for implementation defects, so it has no reach to discover CWE-428, a code-level unquoted-path weakness introduced at implementation.

prevents

Secure coding standards directly mandate quoting search paths and avoiding unsafe path construction.

blocks

A.8.7 can block some exploitation by allowlisting or quarantining attacker-supplied executables, but it does not neutralize the unquoted-path weakness and can miss or permit non-malicious payloads.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-77, a class-level weakness, and none of its children carries one either.

References