CVE-2026-113724: CWE-59: Improper Link Resolution Before File Access ('Link Following') in pypa 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
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 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.
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 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.