Skip to main content
VulnerabilityPublished

CVE-2024-53899: virtualenv · OS Command Injection

Affects virtualenvSource CVE Database V5

0

Mentioned vulnerabilities

Not known to be exploited · CVSS 8.4 High : upgrade to 20.26.6 soon.

Data as of 26 Oct 2026, 17:16 UTC

CVSS 3.1 base score
8.4High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 24 Nov 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
PyPIvirtualenvpkg:pypi/virtualenvOther threatsAffected
  • <20.26.6
Fixed in
  • 20.26.6

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.

References

Community reviews

Loading reviews…