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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Attack requirements: Present; Privileges required: None; User interaction: Active; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 10, 2026-11-28)
- **CWE:** CWE-78
- **Aliases:** BIT-virtualenv-2026-115586, GHSA-cx6f-vjhg-g3cc, PYSEC-2026-4402
- **Published:** 2026-10-23T19:34:46.391Z
- **Modified:** 2026-11-25T10:10:37.819Z

## Who should check

- Projects that depend on PyPI package virtualenv (\>= 21.14.9, \< 21.14.13)
- Anyone running pypa virtualenv \>= 21.14.9, \< 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.

## Affected and fixed versions

- PyPI `virtualenv`: affected \>= 21.14.9, \< 21.14.13; fixed 21.14.13 (osv)
- pypa virtualenv: \>= 21.14.9, \< 21.14.13 (cvelist)

## Mitigation

- Upgrade virtualenv to 21.14.13 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-115586. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-115586.md
Affected: virtualenv >= 21.14.9, < 21.14.13
Fixed in: 21.14.13

Steps:
1. Search this machine and project for virtualenv (PyPI), pypa virtualenv: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-115586 being exploited?

There is no confirmed exploitation: CVE-2026-115586 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-115586?

High: CVSS 7.1 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-115586?

virtualenv \>= 21.14.9, \< 21.14.13.

### Is there a fix for CVE-2026-115586?

Yes. Fixed in 21.14.13. Upgrade virtualenv to 21.14.13 or later.

### How do I check if I'm affected by CVE-2026-115586?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-115586>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-cx6f-vjhg-g3cc> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-4402> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-115586> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-115586>
