CVE-2026-113719: virtualenv: Seed replacement does not contain metadata deletion paths
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall.uninstallpreviousversion() accepts existing seed-package metadata and uninstalldist() joins entries from toplevel.txt and RECORD to site-packages without checking containment. When a reused destination contains distribution metadata influenced by another account, relative traversal, absolute entries, or linked parents can cause app-data reseeding to delete files outside the environment or the environment root with the invoking user's permissions, provided that user has deletion rights over the named paths. The deletion occurs during environment creation before any later use of the environment. Fresh environments without existing package metadata and creation with --clear do not enter this cleanup path. This issue is fixed in version 21.14.9.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
virtualenvto a version that resolves this vulnerability.Fixed in 21.14.9
Event History
Frequently Asked Questions
Who is exposed to this issue?
Users creating or reseeding a virtual environment whose destination already contains seed-package distribution metadata influenced by another account are exposed. Exploitation also requires the invoking user to have permission to delete the targeted paths.
Are newly created environments affected by default?
Fresh environments without existing package metadata do not enter the vulnerable cleanup path. Creating the environment with --clear also avoids that path.
What can happen during exploitation?
Malformed or attacker-influenced metadata entries can cause files outside the environment or environment root to be deleted with the permissions of the user creating the environment. The deletion occurs during environment creation, before the environment is later used.
What should be done if patching cannot happen immediately?
Use --clear when creating environments, and avoid reusing destinations that contain package metadata influenced by other accounts. Ensure the user running virtualenv does not have deletion rights to sensitive paths.
Which version fixes the issue?
The issue is fixed in virtualenv version 21.14.9.