Independent & educational platform Not a government body. No link or affiliation with any government organisation. Made for learning only. Test only systems you own or are authorised to test. Become a Partner or Sponsor → Full disclaimer

CVE-2024-9287

high

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, all…

Vendor / product: Python — python

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.

CVSS
7.8
7.8 (CVSS v3.1)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Severity source: NVD CVSS v3.1 (nvd@nist.gov)
Timeline (UTC)
Published: 2024-10-22 17:15
Modified: 2026-10-30 11:17
NVD status: Modified
Last synced 2 days ago
Verified against the source API 2026-10-30 11:32 UTC
Exploitation
Not listed in CISA KEV (as of last catalog sync)
Absence from KEV does not mean a CVE is not exploited. Exploitation status: unknown (no authoritative evidence in our sources).

Affected products

python / python <3.9.21, ≥3.10.0 <3.10.16, ≥3.11.0 <3.11.11, ≥3.12.0 <3.12.8, ≥3.13.0 <3.13.1, 3.14.0

Weakness classification (CWE)

Source: NVD / CISA. “NVD-CWE-Other” and “NVD-CWE-noinfo” mean NVD could not assign a specific weakness.

Mitigation & advisories

Vendor advisory: https://mail.python.org/archives/list/security-announce@python.org/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/
Patch / mitigation: https://github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7
Patch / mitigation: https://github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db
Patch / mitigation: https://github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8
Patch / mitigation: https://github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97
Patch / mitigation: https://github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b
Patch / mitigation: https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483
Patch / mitigation: https://github.com/python/cpython/pull/124712

References

Data sources

NVD CVE API 2.0 — fetched 2026-10-30 11:32 UTC · record ↗

Learn the basics

Understanding CVEs and CVSS Scores

Related CVEs