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

- Severity: High 7.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-23T19:34:46.391Z
- Modified: 2026-11-27T06:45:49.797Z
- Also known as: GHSA-cx6f-vjhg-g3cc, BIT-VIRTUALENV-2026-115586, PYSEC-2026-4402
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- pypa virtualenv: >= 21.14.9, < 21.14.13
- virtualenv (PyPI): from 21.14.9 before 21.14.13
- virtualenv virtualenv: from 21.14.9 before 21.14.13
- virtualenv (Bitnami): from 21.14.9 before 21.14.13

## Every score

- GitHub_M: CVSS:4.0 7.1 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/pypa/virtualenv/security/advisories/GHSA-cx6f-vjhg-g3cc> (exploit, advisory, evidence, mitigation, vendor-advisory, web)
- <https://github.com/pypa/virtualenv/pull/3466> (fix, issue-tracking, patch, web)
- <https://github.com/pypa/virtualenv/commit/3598e201f6f044e389136b2347a8a919ac03c5f4> (fix, patch, web)
- <https://github.com/pypa/virtualenv/releases/tag/21.14.13> (advisory, article, release-notes, web)
- <https://github.com/pypa/virtualenv> (package)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-115586> (web)

## Sources

- CVE List: [CVE-2026-115586](https://www.cve.org/CVERecord?id=CVE-2026-115586), CVE Terms of Use, modified 2026-10-23
- GitHub Advisory Database: [GHSA-cx6f-vjhg-g3cc](https://github.com/advisories/GHSA-cx6f-vjhg-g3cc), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-115586](https://nvd.nist.gov/vuln/detail/CVE-2026-115586), Public domain, modified 2026-11-24
- PyPA Advisory Database: [PYSEC-2026-4402](https://osv.dev/vulnerability/PYSEC-2026-4402), CC-BY-4.0, modified 2026-11-25
- Bitnami Vulnerability Database: [BIT-VIRTUALENV-2026-115586](https://osv.dev/vulnerability/BIT-VIRTUALENV-2026-115586), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-115586 · Whole record: https://cve.day/CVE-2026-115586.json · Rebuilt by cve.day 2026-11-27T07:07:32.257Z
