CVE-2026-113719: pypa virtualenv path traversal in metadata cleanup

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

virtualenv is a tool for creating isolated Python environments. When reusing an existing environment directory, virtualenv's seed installer can be tricked into deleting files outside the intended environment, or the entire environment itself, if the environment's package metadata has been tampered with by another user or contains specially crafted entries. An attacker who can influence metadata files in a shared environment directory can delete arbitrary files that the invoking user has permissions to remove.

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

Quick answers

Is CVE-2026-113719 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-113719 being exploited in the wild.
How severe is CVE-2026-113719?
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-113719?
Yes. virtualenv (PyPI): upgrade to 21.14.9 or later. Until then: Create fresh virtual environments using the --clear flag to bypass the metadata cleanup path that is vulnerable to this attack. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-113719 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-113719?
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"

Create fresh virtual environments using the --clear flag to bypass the metadata cleanup path that is vulnerable to this attack.

Technical details

The vulnerability exists in PipInstall._uninstall_previous_version() when cleaning up metadata from top_level.txt and RECORD files before reseeding a virtual environment. The paths are joined without validating that they remain within the environment boundaries; relative traversal sequences (..), absolute paths, or symlinked parents can resolve outside the environment root. The deletion occurs during environment creation before any later use. An attacker with access to influence package metadata in a shared environment directory can exploit this on reuse.

Affected products

  • pypa virtualenv before 21.14.9

Identifiers

  • CVE-2026-113719
  • GHSA-hhxq-47xx-j5xx

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.