Skip to content
OpenAdvisories
Medium · 5.8 CVE-2026-102938 BIT-virtualenv-2026-102938EUVD-2026-89465GHSA-9h9j-4vrj-gf7gPYSEC-2026-4012

virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection

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.11, PyEnvCfg.write() writes prompt values verbatim to the line-oriented pyvenv.cfg format while PyEnvCfg._read_values() parses the file with str.splitlines() and accepts the last value for duplicate keys. An attacker who influences --prompt, VIRTUALENV_PROMPT, or configuration input can insert a recognized line boundary and additional keys, including home, causing consumers to use an attacker-selected base interpreter or corrupted environment metadata. The security impact requires prompt input from outside the operator's trust boundary; directly supplied prompt content primarily corrupts the operator's own environment. This issue is fixed in version 21.7.11.

Affected products

VendorProductAffectedFixed
pypa virtualenv < 21.7.11 —

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 —
Debian 12 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 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS python-virtualenv No fix yet —
Ubuntu Pro 22.04 LTS python-virtualenv No fix yet —
Ubuntu Pro 20.04 LTS python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP6 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLES 15 SP5 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLES 15 SP4 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLES 3 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-virtualenv 20.29.3-160000.4.1 SUSE-SU-2026:24243-1
SLES for SAP 15 SP6 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLES for SAP 15 SP5 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLES for SAP 15 SP4 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLES 16.0 python-virtualenv 20.29.3-160000.4.1 SUSE-SU-2026:24243-1
SLE HPC 15 SP5 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
SLE HPC 15 SP4 python-virtualenv 20.22.0-150400.9.12.1 SUSE-SU-2026:4652-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-virtualenv 21.14.2-1.1 openSUSE-SU-2026:11974-1
openSUSE Leap 16.0 python-virtualenv 20.29.3-160000.4.1 openSUSE-SU-2026:22100-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-virtualenv 20.4.0-3.amzn2023.0.5 ALAS2023-2026-3295
Amazon Linux 2023 python3.13-virtualenv 20.21.1-1.amzn2023.0.4 ALAS2023-2026-3296

Azure Linux

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

Wolfi

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

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI virtualenv < 21.7.11 21.7.11 GHSA-9h9j-4vrj-gf7g

Advisories 7

References