CVE-2024-53899: virtualenv allows command injection through activation scripts for a virtual environment
virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Magic template strings are not quoted correctly when replacing. NOTE: this is not the same as CVE-2024-9287.
Published Nov 24, 2024 · Updated Jan 21, 2025
Affected packages
virtualenv
- Ecosystem
- PyPI
- Affected
- < 20.26.6
- Fixed in
- 20.26.6
- Check
pip show virtualenv
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Magic template strings are not quoted correctly when replacing. NOTE: this is not the same as CVE-2024-9287.
Credited to lboynton.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-53899
- https://github.com/pypa/virtualenv/issues/2768
- https://github.com/pypa/virtualenv/pull/2771
- https://github.com/pypa/virtualenv/releases/tag/20.26.6
- https://github.com/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2024-187.yaml
- https://github.com/advisories/GHSA-rqc4-2hc7-8c8v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-113713
virtualenv: Temporary app-data can leave dangling seed package links
medium4.4Oct 23, 2026CVE-2026-113714
virtualenv: Downloaded wheel selection and caching precede verification
low2.3Oct 23, 2026CVE-2026-113715
virtualenv: Venv configuration readback can reinterpret path boundaries
low2.0Oct 23, 2026CVE-2026-113717
virtualenv: Pip seeding with download omits wheel digest verification
low2.3Oct 23, 2026CVE-2026-113718
virtualenv: Xonsh activation literals depend on the script decoding codec
high7.1Oct 23, 2026CVE-2026-113719
virtualenv: Seed replacement does not contain metadata deletion paths
medium4.5Oct 23, 2026
