Skip to main content

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

0
Medium
VulnerabilityCVE-2026-113721cvecve-2026-113721cwe-59
Published: 10/20/2026 (10/20/2026, 19:46:28 UTC)
Source: CVE Database V5
Vendor/Project: pypa
Product: virtualenv

Description

CVE-2026-113721 is a vulnerability in pypa virtualenv prior to version 21.14.9 involving improper link resolution before file access. It allows a local attacker with limited privileges to cause environment creation to overwrite or create files outside the intended directory by exploiting dangling symbolic or hard links during activation content generation and configuration file writing.

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, 20:18:26 UTC

Technical Analysis

The vulnerability in virtualenv versions before 21.14.9 arises because ViaTemplateActivator._generate() only removes existing output if Path.exists() returns true, allowing dangling symlinks to persist and redirect activation content generation. Additionally, PyEnvCfg.write() opens pyvenv.cfg without replacing existing symbolic or hard links first. This improper handling of symbolic and hard links (CWE-59) enables a local user who can prepare entries inside the destination directory to cause files outside the requested environment tree to be created or overwritten with virtualenv-generated content, using the invoking user's permissions. The issue requires that the destination parent directory remains controlled by the environment owner during creation. The vulnerability is fixed in version 21.14.9.

Potential Impact

A local attacker with limited privileges can exploit this vulnerability to create or overwrite files outside the intended virtual environment directory, potentially leading to unauthorized file modification or privilege escalation within the scope of the invoking user's permissions. The impact includes limited confidentiality, integrity, and availability loss as indicated by the CVSS score of 4.5.

Mitigation Recommendations

This vulnerability is fixed in virtualenv version 21.14.9. Users should upgrade to version 21.14.9 or later to remediate the issue. No additional mitigation is required if the environment owner controls the destination parent directory during environment creation.

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: 6ad7c9302cdf04f656591b14

Added to database: 10/20/2026, 20:04:00 UTC

Last enriched: 10/20/2026, 20:18:26 UTC

Last updated: 10/20/2026, 20:19:54 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