CVE-2026-113721: virtualenv: Generated files can follow existing destination links

Published Oct 20, 2026
·
Updated

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.

Affected Software

1 affected component
pypi/virtualenv<21.14.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade virtualenv to a version that resolves this vulnerability.

    Fixed in 21.14.9

Event History

Oct 20, 2026
CVE Published
via MITRE·07:46 PM
Data Sourced
via MITRE·07:46 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Users who create virtual environments in destinations where another local account can pre-create or alter final path entries are exposed. The attacker must be able to place symbolic or hard links inside the target environment destination before generation occurs.

2

What does an attacker need to do to exploit it?

A local attacker prepares a dangling symlink for generated activation files, or an existing symbolic or hard link for pyvenv.cfg, within the destination. When the victim creates the environment, virtualenv may write constrained generated content to a file outside the requested environment tree using the victim's permissions.

3

Are all destination-directory races covered by this issue?

No. The destination parent must remain controlled by the environment owner during creation for this issue; concurrent replacement of the parent directory is identified as a separate concern.

4

What version fixes the issue?

Upgrade virtualenv to version 21.14.9 or later. Versions prior to 21.14.9 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203