Zero Radar
← feed
HighVulnerabilityCVE-2026-115586updated 25 Oct 2026, 13:32 UTC

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.

Fixed in virtualenv 21.14.13Official, 2 sources
SeverityHighCVSS 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

  1. 1Untrusted prompt valueProject config supplies a malicious --prompt
  2. 2Environment createdvirtualenv writes the value into bin/activate
  3. 3Victim activates itsource bin/activate in bash
  4. 4PS1 stored unescapedDollar signs and backticks are not escaped
  5. 5Shell expands promptPromptvars enabled later or child bash started
  6. 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.

Why it is dangerous: An attacker who controls the prompt value can run commands as the user who activates the environment. Developers who build or activate virtualenvs from untrusted repositories or tool configs are at risk.

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 / productAffected versionsFixed in
virtualenv · pip>= 21.14.9, < 21.14.1321.14.13

What to do

  1. Upgrade virtualenv to 21.14.13 or later (pip install --upgrade virtualenv)
  2. Recreate any virtual environments that were built with the affected version, or check their bin/activate script
  3. Do not activate environments created from prompt values you do not trust

Timeline

  1. 23 Oct 2026, 20:17 UTC
    Publicly disclosed
  2. 23 Oct 2026, 20:17 UTC
    Reported by NVD · NVD
  3. 23 Oct 2026, 20:47 UTC
    Reported by GitHub Advisory · GitHub Advisory

Sources 2 reports, oldest first

Official vendor, government CERT or advisory database

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

virtualenv bash activator can run hidden commands from a prompt name · Zero Radar