CVE
CVE-2024-9287
CNA 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.
Affected versions
All Python (CPython) vulnerabilities →
- 3.14.0-alpha1This version only
- ≥ 3.13.0, < 3.13.1Fixed in 3.13.1
- ≥ 3.12.0, < 3.12.8Fixed in 3.12.8
- ≥ 3.11.0, < 3.11.11Fixed in 3.11.11
- ≥ 3.10.0, < 3.10.16Fixed in 3.10.16
- < 3.9.21Fixed in 3.9.21
Distribution packages (Debian, Ubuntu, Red Hat…) backport fixes without changing the upstream version: check your distribution’s advisory as well.
Advisories and patches
- mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL · Vendor Advisory
Data: NVD (public domain), CISA KEV (CC0), FIRST EPSS, OSV.dev / GitHub Advisory Database (CC-BY 4.0) · This database lists affected versions and fixes only. It never hosts or links exploit code.