CVE-2026-113719: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in pypa virtualenv
Description
CVE-2026-113719 is a path traversal vulnerability in pypa virtualenv versions prior to 21.14.9. It occurs during environment creation when existing package metadata is reused, allowing deletion of files outside the intended environment directory if the invoking user has sufficient deletion permissions. The issue is fixed in version 21.14.9.
CVSS v3.1
Score 4.5medium
Affected software
pypa
virtualenv
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in virtualenv affects the PipInstall._uninstall_previous_version() function, which processes existing seed-package metadata during environment creation. Specifically, the _uninstall_dist() method joins entries from top_level.txt and RECORD files to site-packages without verifying that the paths are contained within the environment directory. This lack of containment checks allows relative path traversal, absolute paths, or linked parent directories to cause deletion of files outside the environment root. This deletion happens before the environment is fully created and only if the user has deletion rights on the targeted paths. Fresh environments without existing package metadata or those created with the --clear option do not trigger this issue. The vulnerability is addressed in virtualenv version 21.14.9.
Potential Impact
An attacker with limited privileges who can influence the package metadata can cause deletion of arbitrary files outside the virtual environment directory during environment creation. This can lead to loss of data or disruption of other applications if critical files are deleted. The impact is limited by the requirement that the invoking user must have deletion permissions on the targeted files or directories. The CVSS score is 4.5 (medium severity), reflecting local attack vector, high attack complexity, low privileges required, and impacts on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade virtualenv to version 21.14.9 or later, where this path traversal and improper deletion issue is fixed. Avoid creating environments that reuse existing package metadata if upgrading is not immediately possible. Creating fresh environments without existing metadata or using the --clear option can also avoid triggering this vulnerability. No other specific mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-20T16:03:14.863Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ad7c5ba2cdf04f656576208
Added to database: 10/20/2026, 19:49:14 UTC
Last enriched: 10/20/2026, 20:03:22 UTC
Last updated: 10/20/2026, 20:08:20 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.