Skip to main content

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

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

Description

CVE-2026-113724 is a vulnerability in pypa virtualenv prior to version 21.14.9 involving improper link resolution before file access. The safe_delete() error handler attempts to fix deletion failures by changing file permissions using os.chmod after reading mode bits with os.lstat, which follows symbolic links. This can allow a symlink planted inside a read-only directory to cause a victim-owned target outside the intended directory to become writable by the invoking user, potentially widening write permissions. 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, 20:18:33 UTC

Technical Analysis

The vulnerability arises because the safe_delete() function in virtualenv versions before 21.14.9 uses os.lstat and os.chmod in a way that follows symbolic links. When a deletion fails, safe_delete() reads the mode bits of the path and applies owner-write permissions. If an attacker plants a symlink inside a read-only directory pointing to a victim-owned target outside the directory, the target's permissions can be widened to be writable by the invoking user. This does not affect root and requires the user to own the target and have traversal access to its parent directories. The vulnerability is addressed by fixing this behavior in virtualenv version 21.14.9.

Potential Impact

An attacker who can place a symlink inside a read-only directory can cause a victim-owned file outside the directory to become writable by the invoking user. This could lead to unauthorized modification of files by the user running virtualenv. The vulnerability requires the attacker to own the target file and have traversal access to its parent directories. Root is not affected by this issue. The CVSS score is 4.5 (medium severity), indicating limited impact with low attack vector and high attack complexity.

Mitigation Recommendations

Upgrade virtualenv to version 21.14.9 or later, where this issue is fixed. No other mitigation is specified or required according to the available data.

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

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

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

Last updated: 10/20/2026, 20:19:54 UTC

Views: 6

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