CVE-2024-9287Public exploit

Command execution via unquoted activation-script paths

Published Oct 22, 2024 · Updated Nov 3, 2025

Command injection in CPython's venv module allows local users to execute commands when another user activates a crafted virtual environment. EnvBuilder.replace_variables substitutes attacker-controlled environment-directory and prompt strings into shell activation templates without shell-appropriate quoting. Exploitation requires control of the virtual environment path and a separate user to source its activation script; direct use of the environment's Python executable is unaffected.

CVSS severity5.3
Medium
EPSS probability0.65%
Next 30 days · Sep 16, 2026
Known exploitationUnconfirmed
Based on sourced intelligence
Hinoki checkNot available
Coverage for this vulnerability

See if you're affected

Explore vulnerability checks for your environment with Hinoki.

Book a demo

Summary

What happened

Command injection in CPython's venv module allows local users to execute commands when another user activates a crafted virtual environment. EnvBuilder.replace_variables substitutes attacker-controlled environment-directory and prompt strings into shell activation templates without shell-appropriate quoting. Exploitation requires control of the virtual environment path and a separate user to source its activation script; direct use of the environment's Python executable is unaffected.

The record

CVE
CVE-2024-9287
Published
Oct 22, 2024
Updated
Nov 3, 2025
Vendor
Python Software Foundation
Product
CPython
Classifications
CWE-428, CWE-77, T1059.004
Attack vector
local
Privileges
authenticated

Timeline

How it unfolded

  1. Oct 22, 2024CVE publishedPublication date reported by the CVE source.
  2. Nov 3, 2025Record updatedLatest update available in the CVE record.

Exploitability

Present is not the same as exploitable

Compare your product and version with the public record. A matching version still requires validation against your environment.

Is a vulnerable build present?

Compare these published version ranges with your installed build and any vendor patches.

  1. Affected versionversion=0 <=3.13.0
  2. Affected versionversion=0 <3.9.21
  3. Affected versionversion=3.10.0 <3.10.16
  4. Affected versionversion=3.11.0 <3.11.11
  5. Affected versionversion=3.12.0 <3.12.8
  6. Affected versionversion=3.13.0 <3.13.1
  7. Affected versionversion=3.14.0a1 <3.14.0a2

What conditions does exploitation require?

Attack vectorlocal
Required privilegesauthenticated

What is affected?

Python Software Foundation · CPythonversion=0 <=3.13.0; version=0 <3.9.21; version=3.10.0 <3.10.16; version=3.11.0 <3.11.11; version=3.12.0 <3.12.8; version=3.13.0 <3.13.1; version=3.14.0a1 <3.14.0a2

Published CVSS scores

7.8National Institute of Standards and TechnologyCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
5.3Python Software FoundationCVSS: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

CVSS describes severity. EPSS estimates exploitation probability.

Attacks

What attackers are doing with it

Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.

Daily unique IPsNo honeypot observations are available for this CVE in the selected window.

No observations available

Sep 10, 2026Sep 16, 2026
Latest reporting daySep 16, 2026
Latest daily unique IPsUnavailable
Prior 30-day averageUnavailable
SourceShadowserver honeypots (KEV)
Vectorlocal
Privilegesauthenticated
Known exploitationUnconfirmed
Public exploitPublished

Weakness, pattern, technique

CWE-428Unquoted Search Path or Element
CWE-77Improper Neutralization of Special Elements used in a Command ('Command Injection')
T1059.004Unix Shell

Public exploit references

Labels summarize the accepted research assessment. They do not indicate a test against your environment.

Technologies

Your stack

See the directory against your own environment.

Your stack

Check the software in your environment

Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.

Book a demo