IT SBIT Services
Schneeberger
DEEN
CVE tracker

PyPA virtualenv: Command injection via fish activation script

CVE-2026-113732High 7.8

← All vulnerabilities

Summary

virtualenv creates isolated Python environments. Before version 21.14.2, the fish activation script (activate.fish) quotes paths and prompt values with a POSIX quoting function that fish does not interpret the same way. A backslash before a single quote in an environment path, the --prompt option or the VIRTUALENV_PROMPT value can end the quoted string early and run attacker-chosen commands when a user sources activate.fish. The attack requires that a user sources a crafted activation script, so the risk is mainly for developers and CI runners that use fish.

Affected

  • virtualenv versions before 21.14.2 (all releases up to and including 21.14.1 that ship activate.fish)

Fixed in

  • Fixed in virtualenv 21.14.2 (fix commit 3bddeaf8d02c3ee7f576503efb082f8f494cfcab)
  • Newer releases are available and also contain later fixes; the newest release is the recommended target

Workaround

  • Do not create environments whose path or prompt contains a backslash
  • Read activate.fish before sourcing any environment you did not create
  • No vendor workaround is documented in the CVE record

Exploitation

  • No reports of in-the-wild exploitation found (CISA KEV not verified)
  • The advisory describes a reproduction case; no separate public exploit project found
  • EPSS about 0.002 at the time of the sources checked
  • CISA SSVC: exploitation none, automatable no, technical impact total

Our recommendation

  • Upgrade virtualenv to the newest available release, at least 21.14.2, as part of routine dependency updates
  • Prioritise developer machines and build hosts that use fish and work with third-party repositories
  • Do not source activation scripts from untrusted environments
  • Verify exploitation status in the CISA KEV catalogue before closing this item

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 23:23.

Original description (NVD)

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.2, FishActivator inherits ViaTemplateActivator.quote(), which uses POSIX shlex.quote() even though fish interprets backslashes and single quotes differently. An attacker-influenced environment path, --prompt, or VIRTUALENV_PROMPT value containing a backslash before a quote can therefore terminate the generated fish literal and execute command substitution when the user sources activate.fish. This issue is fixed in version 21.14.2.

NVD references (3)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.