Skip to main content

virtualenv CVE-2026-113720

| EUVDEUVD-2026-105302 MEDIUM
Incorrect Permission Assignment for Critical Resource (CWE-732)
2026-10-20 GitHub_M GHSA-fc2g-4w5p-6whm
4.4
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local account on shared host
  2. Exploit
    Locate group/world-writable cached seed files
  3. Execution
    Overwrite pip/__init__.py with payload
  4. Impact
    Owner creates env and runs pip, executing attacker code

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V13 - Configuration Permission assignment review
Exploitation Conditions

Requires all of: (1) a shared multi-user POSIX host; (2) virtualenv's app-data cache populated by an earlier run under a permissive umask (e.g. 0000 or 0002), so cached files carry group/world-write bits; (3) use of the app-data COPY seeder specifically (not the symlink seeder); (4) a destination/cache parent that is traversable rather than private - the description notes a private destination parent prevents access; and (5) the victim (environment owner) subsequently creating and executing from a later environment. Key limiting factors that reduce real-world risk: the attacker cannot force the earlier permissive umask (it must already have occurred), local access with a distinct account is required (PR:L), the attack has high complexity with a specific attack requirement (AC:H/AT:P), and victim interaction is needed to create and run the later environment (UI:P).

Impact

This is a genuinely low-priority, medium-severity issue despite affecting a very widely used tool. The CVSS 4.0 base score of 4.4 is driven down by a demanding precondition set: AV:L (local access only, not remote), AC:H (high attack complexity), AT:P (a specific attack requirement must be present), PR:L (attacker needs a local account), and UI:P (the victim must passively perform an action - creating a later environment). The only elevated metric is VI:H (integrity), reflecting that successful exploitation lets attacker-controlled code (e.g. pip/__init__.py) run as the environment owner; VC:L and VA:L are minor. No EPSS score, KEV listing, or POC was provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation. The vulnerability class (CWE-732, incorrect permission assignment) combined with the description's own caveats - 'the attacker cannot force the earlier umask' and 'a private destination parent prevents access' - means exploitation depends on a pre-existing permissive-umask cache and a traversable, shared multi-user layout that the attacker cannot themselves create. Signals are internally consistent (local vector, config/timing-dependent, no exploitation intelligence), all pointing to a targeted local-multi-user edge case rather than a broadly exploitable flaw. Note the 'Information Disclosure' tag conflicts with the actual integrity/code-execution impact (VI:H, CWE-732) and appears mislabeled.

Exploit ScenarioDerived

On a shared multi-user host where virtualenv's app-data cache was previously populated under a permissive umask, a local attacker with a separate account overwrites the resulting group/world-writable cached seed files (such as pip/__init__.py). When another user later creates a virtualenv using the app-data copy seeder and runs pip, the attacker's injected code executes under that victim's account. No public exploit was identified, and exploitation requires several non-default local conditions to already exist.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 20, 2026

virtualenv before 21.14.9 can propagate permissive filesystem modes from its app-data cache into newly created environments when the COPY seeder is used, allowing a local attacker with a separate account to alter and execute seeded package code such as pip/__init__.py as the environment owner. Exploitation requires a shared multi-user POSIX host, a cache already populated under a permissive umask, a traversable destination parent, and the victim later creating and running an environment; the attacker cannot force the earlier umask. No public exploit code or CISA KEV entry was identified at time of analysis.

RemediationAI

Upgrade to virtualenv 21.14.9 or later, which applies the current umask to copied interpreter and seed-package files instead of inheriting cached permission bits (vendor advisory GHSA-fc2g-4w5p-6whm, fix PR 3425, commit 35f0b33562790176dd186d0a3c517af3acc7a0e1). If upgrading is not immediately possible, switch environments that rely on the app-data COPY seeder to the symlink seeder where platform and workflow permit, recognizing that symlinks change isolation and may not be usable on all platforms; ensure the app-data cache and destination parents are not group/world-writable or traversable by other local accounts, though this may break shared-cache workflows; run virtualenv under a restrictive umask such as 0022 or 0077 and rebuild any app-data cache that may have been populated under a permissive umask, accepting that group collaboration on generated files will be reduced. Patch status: Vendor-released patch: 21.14.9.

Affected VersionsENISA

virtualenv < 21.14.9

Affected Packages

pypi virtualenv fix: 21.14.9

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The issue is an incorrect permission assignment (CWE-732) in virtualenv's app-data copy seeder. virtualenv caches interpreter and seed-package files in an app-data directory; prior to 21.14.9 the COPY seeder used shutil.copy(), which preserves source permission bits, so cached modes from an earlier run under a permissive umask override the current run's umask. The fix in PR 3425 replaces that path with a _copy_file helper that opens the destination with O_CREAT|O_EXCL using a base mode of 0644 for data files or 0755 for executable files, letting the process umask determine final group/world permissions and deliberately not preserving source modes; executable sources remain executable within the umask. The affected CPE is cpe:2.3:a:pypa:virtualenv:*:*:*:*:*:*:*:* across POSIX systems where the app-data COPY seeder is used, and the vulnerability is local because it depends on another account's ability to write through group/world-writable cached files in a traversable directory.

Know when Virtualenv gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 4.4 MEDIUM
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.5 MEDIUM

Local cross-account attack needing a pre-existing permissive-umask cache and victim-created environment, so AV:L/AC:H/PR:L/UI:R; impact is mainly integrity (I:H) with minor C/A.

3.1 AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L
4.0 AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
Red Hat 6.7 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 20, 2026 - 21:18 EUVD
CVE Published
Oct 20, 2026 - 19:43 cve.org
MEDIUM 4.4

DescriptionCVE.org

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the app-data copy seeder uses shutil.copy() to copy cached package files into later environments, causing cached source modes to override the current run's umask. A cache populated under a permissive umask can therefore produce files writable by another local account in a later traversable environment, allowing package code such as pip/__init__.py to be modified and executed by the environment owner. The attacker cannot force the earlier umask, and a private destination parent prevents access. This issue is fixed in version 21.14.9.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
High
extremely popular Python environment tool, ubiquitous across dev and CI pipelines
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2024-53899 HIGH POC
7.8 Nov 24

virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Rated high

CVE-2026-102930 HIGH POC
7.7 Sep 29

virtualenv versions prior to 21.7.12 cache and seed pip/setuptools wheels without verifying their bytes, so an attacker

CVE-2026-102938 MEDIUM POC
5.8 Sep 29

Configuration injection in PyPA virtualenv before 21.7.11 lets a line boundary embedded in a prompt value inject extra k

CVE-2026-113722 HIGH
7.8 Oct 20

Command injection in PyPA virtualenv before 21.14.9 lets an attacker who controls the destination path of a virtual envi

CVE-2026-113725 HIGH
7.8 Oct 20

Command injection in virtualenv's bash activation script prior to 21.14.7 allows a crafted environment name or --prompt

CVE-2026-102925 HIGH
7.8 Sep 29

Command injection in the bash, zsh, and fish activation scripts generated by virtualenv releases prior to 21.7.13 lets a

CVE-2026-102937 HIGH
7.3 Sep 29

Command injection in PyPA virtualenv before 21.7.12 allows an attacker who controls the environment's prompt value - via

CVE-2026-115586 HIGH
7.1 Oct 23

Command injection in virtualenv's bash activator lets an attacker-supplied --prompt value be stored unescaped in PS1 and

CVE-2026-113723 HIGH
7.1 Oct 20

Caller-influenced prompt text in virtualenv's bash activation script prior to 21.14.9 can be re-expanded by bash as exec

CVE-2026-113718 HIGH
7.1 Oct 20

A code injection flaw in PyPA virtualenv before 21.14.9 lets attacker-influenced non-ASCII characters in the xonsh promp

CVE-2026-113724 MEDIUM
4.5 Oct 20

Symlink following in virtualenv's safe_delete() deletion-error handler (all versions prior to 21.14.9) lets a local atta

CVE-2026-113721 MEDIUM
4.5 Oct 20

Symlink-following file writes in virtualenv before 21.14.9 let a second, unprivileged local account redirect generated e

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy