7.8
HIGH CVSS 3.1
CVE-2024-9287
"Python CPython venv Command Injection Vulnerability"
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.

INFO

Published Date :

Oct. 22, 2024, 5:15 p.m.

Last Modified :

April 25, 2025, 11:15 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2024-9287 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Python python
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH [email protected]
CVSS 4.0 MEDIUM [email protected]
Solution
This vulnerability in Python's venv module requires updating affected Python packages.
  • Update affected Python packages to remediate the vulnerability.
  • Consult vendor advisories for specific update instructions.
Public PoC/Exploit Available at Github

CVE-2024-9287 has a 2 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-9287 is associated with the following CWEs:

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Toolkit for k8s administrators/developers.

Dockerfile Shell

Updated: 3 months ago
1 stars 0 fork 0 watcher
Born at : July 10, 2022, 10:30 p.m. This repo has been linked 181 different CVEs too.

None

Updated: 1 month, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : Oct. 18, 2021, 11:07 a.m. This repo has been linked 27 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-9287 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-9287 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Apr. 25, 2025

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20250425-0006/
  • Initial Analysis by [email protected]

    Feb. 10, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Added CWE NIST CWE-77
    Added CPE Configuration OR *cpe:2.3:a:python:python:*:*:*:*:*:*:*:* versions up to (excluding) 3.9.21 *cpe:2.3:a:python:python:*:*:*:*:*:*:*:* versions from (including) 3.10.0 up to (excluding) 3.10.16 *cpe:2.3:a:python:python:*:*:*:*:*:*:*:* versions from (including) 3.11.0 up to (excluding) 3.11.11 *cpe:2.3:a:python:python:*:*:*:*:*:*:*:* versions from (including) 3.12.0 up to (excluding) 3.12.8 *cpe:2.3:a:python:python:*:*:*:*:*:*:*:* versions from (including) 3.13.0 up to (excluding) 3.13.1 *cpe:2.3:a:python:python:3.14.0:alpha1:*:*:*:*:*:*
    Changed Reference Type https://github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7 No Types Assigned https://github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7 Patch
    Changed Reference Type https://github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db No Types Assigned https://github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db Patch
    Changed Reference Type https://github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8 No Types Assigned https://github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8 Patch
    Changed Reference Type https://github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97 No Types Assigned https://github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97 Patch
    Changed Reference Type https://github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b No Types Assigned https://github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b Patch
    Changed Reference Type https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483 No Types Assigned https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483 Patch
    Changed Reference Type https://github.com/python/cpython/issues/124651 No Types Assigned https://github.com/python/cpython/issues/124651 Issue Tracking
    Changed Reference Type https://github.com/python/cpython/pull/124712 No Types Assigned https://github.com/python/cpython/pull/124712 Issue Tracking, Patch
    Changed Reference Type https://mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/ No Types Assigned https://mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/ Vendor Advisory
  • CVE Modified by [email protected]

    Jan. 31, 2025

    Action Type Old Value New Value
    Added Reference https://github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b
  • CVE Modified by [email protected]

    Nov. 04, 2024

    Action Type Old Value New Value
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7 [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8 [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97 [No types assigned]
  • CVE Modified by [email protected]

    Oct. 30, 2024

    Action Type Old Value New Value
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483 [No types assigned]
  • CVE Received by [email protected]

    Oct. 22, 2024

    Action Type Old Value New Value
    Added 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.
    Added Reference Python Software Foundation https://github.com/python/cpython/issues/124651 [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/pull/124712 [No types assigned]
    Added Reference Python Software Foundation https://mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/ [No types assigned]
    Added CWE Python Software Foundation CWE-428
    Added CVSS V4.0 Python Software Foundation 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/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 is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 5.3
Attack Vector
Attack Complexity
Attack Requirements
Privileges Required
User Interaction
VS Confidentiality
VS Integrity
VS Availability
SS Confidentiality
SS Integrity
SS Availability
Base CVSS Score: 7.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact