virtualenv bash activator can run hidden commands from a prompt name
A virtual environment's prompt name can contain hidden commands that run on your computer when you activate it, if the prompt name came from a project you did not write.
| Severity | HighCVSS 7.1 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yesvirtualenv 21.14.13 · since 25 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Untrusted prompt valueProject config supplies a malicious --prompt
- 2Environment createdvirtualenv writes the value into bin/activate
- 3Victim activates itsource bin/activate in bash
- 4PS1 stored unescapedDollar signs and backticks are not escaped
- 5Shell expands promptPromptvars enabled later or child bash started
- ResultAttacker commands run as the victim user
What happened
In virtualenv 21.14.9 through 21.14.12, the bash bin/activate script copies the --prompt value into PS1 without escaping $ or backticks when promptvars is off and posix mode is off at activation time. Re-enabling prompt expansion later, or starting a child bash inheriting PS1, makes bash run command substitutions in that value.
Are you affected?
You are affected if you use pip-installed virtualenv 21.14.9 up to but not including 21.14.13 and activate bash environments whose prompt value comes from an untrusted source.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| virtualenv · pip | >= 21.14.9, < 21.14.13 | 21.14.13 |
What to do
- Upgrade virtualenv to 21.14.13 or later (pip install --upgrade virtualenv)
- Recreate any virtual environments that were built with the affected version, or check their bin/activate script
- Do not activate environments created from prompt values you do not trust
Timeline
- 23 Oct 2026, 20:17 UTCPublicly disclosed
- 23 Oct 2026, 20:17 UTCReported by NVD · NVD
- 23 Oct 2026, 20:47 UTCReported by GitHub Advisory · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- NVD23 Oct 2026, 20:17 UTC
- GitHub Advisory23 Oct 2026, 20:47 UTC
Technical details
- ID
- CVE-2026-115586 · GHSA-cx6f-vjhg-g3cc
- CVSS
- 7.1 / 10
- EPSS
- 0.3% chance of exploitation within 30 days
- Disclosed
- 23 Oct 2026, 20:17 UTC
- On Zero Radar
- before the radar started
- Last change
- 25 Oct 2026, 13:32 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works