Name | CVE-2024-9287 |
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 | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|
python2.7 (PTS) | jessie, jessie (lts) | 2.7.9-2-ds1-1+deb8u12 | vulnerable |
| stretch (security) | 2.7.13-2+deb9u6 | vulnerable |
| stretch (lts), stretch | 2.7.13-2+deb9u9 | vulnerable |
| buster (security), buster, buster (lts) | 2.7.16-2+deb10u4 | vulnerable |
| bullseye | 2.7.18-8+deb11u1 | vulnerable |
python3.11 (PTS) | bookworm | 3.11.2-6+deb12u2 | vulnerable |
| bookworm (security) | 3.11.2-6+deb12u3 | vulnerable |
python3.12 (PTS) | trixie | 3.12.6-1 | vulnerable |
| sid | 3.12.7-1 | vulnerable |
python3.13 (PTS) | sid, trixie | 3.13.0-1 | vulnerable |
python3.9 (PTS) | bullseye | 3.9.2-1 | vulnerable |
The information below is based on the following data on fixed versions.
Notes
[bullseye] - python2.7 <end-of-life> (Unsupported in Bullseye, only included to build a few applications)
https://mail.python.org/archives/list/security-announce@python.org/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/
https://github.com/python/cpython/pull/124712
https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483 (3.13-branch)