BreachSpiderVerified, not vibes

CVE-2024-9287 in Python

High 7.8

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 virtua...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.17.8
CVSS v45.3
EPSS0.5%
EPSS percentile32th
FixSee advisory

Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Python Python 3.14.0 < 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

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

View Vendor Advisory →

Vendor PSIRT: [email protected]

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2024-9287
BreachSpider IDBS-2024-GLOBAL-046259-H
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2024-10-22
Last modified2026-10-30
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-77: Command Injection

Attacker injects operating system commands through application inputs passed to a shell or system call.

CWE-428: CWE-428

Related attack patterns (CAPEC)

CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-77

CAPEC-76 Manipulating Web Input to File System Calls via CWE-77

CAPEC-15 Command Delimiters via CWE-77

CAPEC-40 Manipulating Writeable Terminal Devices via CWE-77

CAPEC-75 Manipulating Writeable Configuration Files via CWE-77

Show all 8

CAPEC-136 LDAP Injection via CWE-77

CAPEC-183 IMAP/SMTP Command Injection via CWE-77

CAPEC-248 Command Injection via CWE-77

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

A vulnerability in the CPython `venv` module and CLI allows attackers to inject commands into virtual environment activation scripts, leading to potential command execution when the virtual environment is activated.

The vulnerability arises from improper quoting of path names when creating a virtual environment. This allows an attacker to manipulate the path names to include malicious commands in the activation scripts.

Questions

What is CVE-2024-9287?

A vulnerability in the CPython `venv` module and CLI allows attackers to inject commands into virtual environment activation scripts, leading to potential command execution when the virtual environment is activated.

What is the CVSS score for CVE-2024-9287?

CVE-2024-9287 has CVSS 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.5%.

Is CVE-2024-9287 actively exploited?

No confirmed active exploitation of CVE-2024-9287 as of 2026-11-03.

How do I remediate CVE-2024-9287?

Priority: IMMEDIATE. Advisory: https://mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/ PSIRT: [email protected]

What systems are affected by CVE-2024-9287?

CVE-2024-9287 affects Python Python.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Python","product":"Python","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-30.