CVE-2024-53899: virtualenv · OS Command Injection
Affects virtualenvSource CVE Database V5
Mentioned vulnerabilities
Not known to be exploited · CVSS 8.4 High : upgrade to 20.26.6 soon.
Data as of 26 Oct 2026, 09:15 UTC
- EPSS
- 1.5% chance of exploitation in 30 days – higher than 75% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 20.26.6
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 24 Nov 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade virtualenv to 20.26.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIvirtualenvpkg:pypi/virtualenvOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2024-53899, organizations should immediately upgrade virtualenv to version 20.26.6 or later, where the vulnerability has been addressed. If upgrading is not immediately feasible, review and sanitize any activation scripts generated by virtualenv to ensure that template strings are properly quoted and do not allow command injection. Restrict local access to systems running virtual environments by enforcing strict access controls and monitoring for suspicious activity, especially around virtual environment activation events. Implement application whitelisting and endpoint detection and response (EDR) solutions to detect anomalous command executions. Educate developers and system administrators about the risks of using outdated virtualenv versions and the importance of secure environment management. Regularly audit Python environments and dependencies for known vulnerabilities and apply patches promptly. Consider isolating build and runtime environments to limit the impact of potential exploitation.
Description
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.