CVE-2026-113716: virtualenv symlink directory escape in environment setup

CVE-2026-113716 · Severity: medium · CVSS 4.5 · Published 2026-10-20

virtualenv is a Python tool that creates isolated virtual environments for running Python applications. A flaw in how it creates environment directories allows a local attacker on a shared system to plant symbolic links that redirect file writes outside the intended environment, potentially exposing or modifying files in other users' environments or system directories.

Technologies: Pypa Virtualenv, virtualenv (PyPI). Vendors: Pypa, PyPI.

Quick answers

Is CVE-2026-113716 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-113716 being exploited in the wild.
How severe is CVE-2026-113716?
Medium severity, with a CVSS score of 4.5, published 20 October 2026.
Which products and versions are affected?
Pypa Virtualenv before 21.14.9; virtualenv (PyPI) < 21.14.9, ECOSYSTEM:introduced=0,fixed=21.14.9.
Is there a fix for CVE-2026-113716?
Yes. virtualenv (PyPI): upgrade to 21.14.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-113716 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-113716?
Check whether you run Pypa Virtualenv or virtualenv (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • virtualenv (PyPI): upgrade to 21.14.9 or later
    pip install "virtualenv>=21.14.9"

Technical details

The vulnerability exists in the builtin creator's ensure_dir() function, which uses exists() to check for directories—a call that follows symlinks. An attacker can plant a symlink at executable, library, or package directory paths before virtualenv runs, causing interpreter creation, seed installation, and activation generation to write files through the link to an arbitrary location. The fix replaces ensure_dir with ensure_within, which uses lstat() to detect and remove symlinks and junctions before creating directories.

Affected products

  • pypa virtualenv before 21.14.9

Identifiers

  • CVE-2026-113716
  • GHSA-cw65-gx24-rc82

Timeline

  • 2026-10-20: disclosed
  • 2026-10-17: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.