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.
Advisories
Source ID Title
Debian DLA Debian DLA DLA-3966-1 pypy3 security update
Debian DLA Debian DLA DLA-3980-1 python3.9 security update
EUVD EUVD EUVD-2024-50376 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.
Ubuntu USN Ubuntu USN USN-7116-1 Python vulnerability
Ubuntu USN Ubuntu USN USN-7348-1 Python vulnerabilities
Ubuntu USN Ubuntu USN USN-7488-1 Python vulnerabilities
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Tue, 04 Nov 2025 08:30:00 +0900


Wed, 16 Jul 2025 22:45:00 +0900

Type Values Removed Values Added
Metrics epss

{'score': 0.00041}

epss

{'score': 0.00043}


Sat, 26 Apr 2025 08:45:00 +0900

Type Values Removed Values Added
References

Tue, 11 Feb 2025 04:15:00 +0900

Type Values Removed Values Added
First Time appeared Python python
Weaknesses CWE-77
CPEs cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
cpe:2.3:a:python:python:3.14.0:alpha1:*:*:*:*:*:*
Vendors & Products Python python
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 01 Feb 2025 05:15:00 +0900


Fri, 13 Dec 2024 11:15:00 +0900

Type Values Removed Values Added
First Time appeared Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.4
Vendors & Products Redhat rhel Eus

Thu, 12 Dec 2024 23:45:00 +0900

Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:enterprise_linux:9

Thu, 05 Dec 2024 11:30:00 +0900

Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:8
Vendors & Products Redhat
Redhat enterprise Linux

Tue, 05 Nov 2024 02:45:00 +0900


Thu, 31 Oct 2024 01:15:00 +0900


Fri, 25 Oct 2024 11:00:00 +0900

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N'}

threat_severity

Moderate


Wed, 23 Oct 2024 03:15:00 +0900

Type Values Removed Values Added
First Time appeared Python
Python cpython
CPEs cpe:2.3:a:python:cpython:*:*:*:*:*:*:*:*
Vendors & Products Python
Python cpython
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 23 Oct 2024 01:45:00 +0900

Type Values Removed Values 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.
Title Virtual environment (venv) activation scripts don't quote paths
Weaknesses CWE-428
References
Metrics cvssV4_0

{'score': 5.3, 'vector': '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:Green'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2025-11-03T22:33:21.116Z

Reserved: 2024-09-27T14:48:44.181Z

Link: CVE-2024-9287

cve-icon Vulnrichment

Updated: 2025-11-03T22:33:21.116Z

cve-icon NVD

Status : Modified

Published: 2024-10-22T17:15:06.697

Modified: 2025-11-03T23:17:33.603

Link: CVE-2024-9287

cve-icon Redhat

Severity : Moderate

Publid Date: 2024-10-22T16:34:39Z

Links: CVE-2024-9287 - Bugzilla

cve-icon OpenCVE Enrichment

No data.

Weaknesses