Medium severity · published Oct 20, 2026
CVE-2026-113721
virtualenv: Generated files can follow existing destination links
4.5
CVSS
0.1%
EPSS
No
On KEV
Description
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, ViaTemplateActivator._generate() removes an existing output only when Path.exists() is true, allowing a dangling symlink to survive and redirect generated activation content, while PyEnvCfg.write() opens pyvenv.cfg without first replacing an existing symbolic or hard link. Another local account that prepares final entries inside the destination can therefore cause environment creation to create or overwrite files outside the requested tree with constrained virtualenv-generated content and the invoking user's permissions. The destination parent must remain controlled by the environment owner during creation; concurrent parent-directory replacement is a separate concern. This issue is fixed in version 21.14.9.
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.1% · higher than 4% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
VI
virtualenv · pypa
< 21.14.9 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-113721
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-113721
github.com
https://github.com/pypa/virtualenv/commit/d25f28699eefb1fc34a251e5adf2b5de844c36cd
github.com
https://github.com/pypa/virtualenv/pull/3431
github.com
https://github.com/pypa/virtualenv/releases/tag/21.14.9
github.com
https://github.com/pypa/virtualenv/security/advisories/GHSA-558c-9hv2-4prj
More from virtualenv
7.8
CVE-2026-113726
virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST
7.8
CVE-2026-113776
virtualenv activation scripts run code from a path that contains a placeholder name
7.8
CVE-2026-113732
virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
7.8
CVE-2026-113725
virtualenv bash activate runs commands from an environment name with a backslash before $
7.8
CVE-2026-113722
virtualenv: Generated POSIX console launchers interpret destination paths as shell syntax
