CVE-2026-113716: CWE-59: Improper Link Resolution Before File Access ('Link Following') in pypa virtualenv
Description
CVE-2026-113716 is a medium severity vulnerability in pypa virtualenv prior to version 21.14.9. It involves improper link resolution before file access, where the tool's directory creation function follows symlinks, potentially causing writes outside the intended directory. This occurs when another local user prepares a directory tree with symlinks that the invoking user can access. 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 arises because virtualenv's builtin creator calls ensure_dir() for executable, library, and package directories, and ensure_dir() accepts existing symlinks since exists() follows them. As a result, interpreter creation, seed installation, and activation generation may write through the linked parent directory outside the requested destination if another local account has prepared the directory tree with symlinks accessible to the invoking user. The --clear option mitigates this by removing the planted tree first. This improper link resolution before file access (CWE-59) can lead to unintended writes outside the target directory. The issue is resolved in virtualenv version 21.14.9.
Potential Impact
An attacker with local access who can prepare a directory tree with symlinks accessible to the invoking user may cause virtualenv to write files outside the intended isolated environment. This could lead to limited confidentiality, integrity, and availability impacts on the local system. The CVSS score of 4.5 reflects a medium severity with local attack vector, high attack complexity, low privileges required, and no user interaction needed.
Mitigation Recommendations
Upgrade virtualenv to version 21.14.9 or later where this issue is fixed. The --clear option can mitigate the issue by removing the planted directory tree before creation, but the recommended action is to apply the official fix by upgrading.
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: 6ad7c23c2cdf04f656561a7b
Added to database: 10/20/2026, 19:34:20 UTC
Last enriched: 10/20/2026, 19:48:31 UTC
Last updated: 10/20/2026, 19:49:14 UTC
Views: 7
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.