Skip to content
OpenAdvisories
High · 7.8 CVE-2026-102925 BIT-virtualenv-2026-102925EUVD-2026-89461GHSA-p58f-9548-mpm2PYSEC-2026-4013

virtualenv bash and fish activation scripts execute commands embedded in paths

Published Sep 29, 2026 · Updated Sep 30, 2026 · Assigned by GitHub_M

Description

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.13, the generated activate (bash and zsh) and activate.fish scripts place values already escaped by shlex.quote inside an additional quoted context. In the bash and zsh script, a crafted virtual environment path reaches __VIRTUAL_ENV__ when a relocated environment's recorded directory is absent; in the fish script, crafted Tcl or Tk library paths reach __TCL_LIBRARY__ or __TK_LIBRARY__. The surplus quotes can terminate the data-only quoted run and leave shell metacharacters parsed as commands when a user sources the activation script, allowing code execution with that user's privileges. This issue is fixed in version 21.7.13.

Affected products

VendorProductAffectedFixed
pypa virtualenv < 21.7.13 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-virtualenv No fix yet —
Debian 13 python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-virtualenv No fix yet —
Ubuntu 26.04 LTS python-virtualenv No fix yet —
Ubuntu 18.04 LTS python-virtualenv No fix yet —
Ubuntu 16.04 LTS python-virtualenv No fix yet —
Ubuntu 14.04 LTS python-virtualenv No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-virtualenv 21.14.2-1.1 openSUSE-SU-2026:11974-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-virtualenv 20.36.1-9 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling py3-cassandra-medusa 0.30.1-r3 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI virtualenv < 21.7.13 21.7.13 GHSA-p58f-9548-mpm2

Advisories 2

References