Skip to main content

CVE-2026-113716: CWE-59: Improper Link Resolution Before File Access ('Link Following') in pypa virtualenv

0
Medium
VulnerabilityCVE-2026-113716cvecve-2026-113716cwe-59
Published: 10/20/2026 (10/20/2026, 19:18:09 UTC)
Source: CVE Database V5
Vendor/Project: pypa
Product: 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

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Affected software

pypa

virtualenv

Affected versions
<21.14.9
virtualenv
pkg:pypi/virtualenv
Affected versions
<21.14.9

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/20/2026, 19:48:31 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses