{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-9287","id":"CVE-2024-9287","title":"Virtual environment (venv) activation scripts don't quote paths","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. ","descriptionLong":"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.","published":"2024-10-22T16:34:39.210Z","updated":"2026-11-10T10:45:31.670819872Z","reserved":"2024-09-27T14:48:44.181Z","status":"Modified","rejected":false,"assigner":"PSF","metric":{"version":"4.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","rating":"medium","source":"PSF"},"metrics":[{"version":"4.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","rating":"medium","source":"PSF"},{"version":"4.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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Green","rating":"medium","source":"python.org"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"}],"rating":"medium","products":["Python Software Foundation CPython"],"affectedProducts":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","lessThan":"3.9.21","status":"affected","versionType":"python"},{"version":"3.10.0","lessThan":"3.10.16","status":"affected","versionType":"python"},{"version":"3.11.0","lessThan":"3.11.11","status":"affected","versionType":"python"},{"version":"3.12.0","lessThan":"3.12.8","status":"affected","versionType":"python"},{"version":"3.13.0","lessThan":"3.13.1","status":"affected","versionType":"python"},{"version":"3.14.0a1","lessThan":"3.14.0a2","status":"affected","versionType":"python"}],"platforms":[]}],"packages":[],"cwes":["CWE-428","CWE-77"],"aliases":["BIT-libpython-2024-9287","BIT-python-2024-9287","BIT-python-min-2024-9287","PSF-2024-12"],"references":[{"url":"https://github.com/python/cpython/issues/124651","tags":["issue-tracking","Issue Tracking","report"]},{"url":"https://github.com/python/cpython/pull/124712","tags":["patch","Issue Tracking","Patch","fix","web"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/","tags":["vendor-advisory","Vendor Advisory","advisory"]},{"url":"https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483","tags":["patch","Patch","fix"]},{"url":"https://github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7","tags":["patch","Patch","fix"]},{"url":"https://github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db","tags":["patch","Patch","fix"]},{"url":"https://github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8","tags":["patch","Patch","fix"]},{"url":"https://github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97","tags":["patch","Patch","fix"]},{"url":"https://github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b","tags":["patch","Patch","fix"]},{"url":"https://security.netapp.com/advisory/ntap-20250425-0006/","tags":["advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html","tags":["web"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/11/msg00024.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/9xxx/CVE-2024-9287.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-9287","tags":["advisory"]},{"url":"https://github.com/python/cpython","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00648,"epssPercentile":0.51859,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-9287","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-9287","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-9287","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-9287","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["python"],"critical":[],"attention":null}