CVE-2024-9287

NameCVE-2024-9287
DescriptionA 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.
SourceCVE (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 PackageReleaseVersionStatus
python2.7 (PTS)bullseye2.7.18-8+deb11u1vulnerable
python3.11 (PTS)bookworm3.11.2-6+deb12u2vulnerable
bookworm (security)3.11.2-6+deb12u3vulnerable
python3.12 (PTS)trixie3.12.6-1vulnerable
sid3.12.7-1vulnerable
python3.13 (PTS)sid, trixie3.13.0-1vulnerable
python3.9 (PTS)bullseye3.9.2-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python2.7source(unstable)(unfixed)
python3.11source(unstable)(unfixed)
python3.12source(unstable)(unfixed)
python3.13source(unstable)(unfixed)
python3.9source(unstable)(unfixed)

Notes

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)

Search for package or bug name: Reporting problems