CVE-2024-9287
Virtual environment (venv) activation scripts don't quote paths
Reported by psf · Published October 22, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3-devel | Amazon Linux | 3.9.21-1.amzn2023.0.1, 3.7.16-1.amzn2.0.17 |
| python-3.10 | Wolfi | 3.10.15-r3 |
| python-3.9 | Chainguard | 3.9.20-r3 |
| python3-idle | Amazon Linux | 3.9.21-1.amzn2023.0.1 |
| libpython | Bitnami | 3.13.1, 3.12.8, 3.11.11, 3.10.16, 3.9.21 |
| python3-libs | Amazon Linux | 3.9.21-1.amzn2023.0.1, 3.7.16-1.amzn2.0.17 |
| python3 | Alpine | 3.12.8-r0, 3.11.11-r0 |
| python3.12-tkinter | Amazon Linux | 3.12.8-1.amzn2023.0.1 |
| python-3.11 | Chainguard | 3.11.10-r4 |
| python-3.12 | Wolfi | 3.12.7-r1 |
| python3 | Amazon Linux | 3.9.21-1.amzn2023.0.1, 3.7.16-1.amzn2.0.17 |
| python3.12-debug | Amazon Linux | 3.12.8-1.amzn2023.0.1 |
43 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0, 3.10.0, 3.11.0 |
| amazon:2023 | python3-devel | 0 |
| wolfi | python-3.10 | 0 |
| chainguard | python-3.9 | 0 |
| amazon:2023 | python3-idle | 0 |
| amazon:2 | python3-libs | 0 |
| python | cpython | 0 |
| alpine | python3 | 0, 0 |
| amazon:2023 | python3.12-tkinter | 0 |
| chainguard | python-3.11 | 0 |
| wolfi | python-3.12 | 0 |
| amazon:2023 | python3 | 0 |
| amazon:2023 | python3.12-debug | 0 |
| amazon:2023 | python3-tkinter | 0 |
| amazon:2023 | python3.12-test | 0 |
| amazon:2023 | python3.11-test | 0 |
| amazon:2023 | python3-libs | 0 |
| amazon:2 | python3-tkinter | 0 |
| amazon:2023 | python3.11 | 0 |
| amazon:2023 | python3-test | 0 |
…and 22 more
Timeline
- Oct 21, 2024 Fix PR Merged
- Oct 22, 2024 Coalition ESS Score (17 in total, the first dated here)
- Oct 22, 2024 CVE Published
- Oct 23, 2024 EPSS Score (30 in total, the first dated here)
- Jun 2, 2026 Security Advisory (42 in total, the first dated here)
- Nov 1, 2026 Distribution Patch (21 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-9287
vulnetix vdb fixes CVE-2024-9287
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-9287/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- issue-tracking
- patch
- vendor-advisory
- patch
- patch
- patch
- patch
- patch
- patch
- https://security.netapp.com/advisory/ntap-20250425-0006/ url
- https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html url
- https://lists.debian.org/debian-lts-announce/2024/11/msg00024.html url