Skip to main content

virtualenv CVE-2026-113715

| EUVDEUVD-2026-105301 LOW
Improper Neutralization of CRLF Sequences ('CRLF Injection') (CWE-93)
2026-10-20 GitHub_M GHSA-qmx5-4p3x-wvqf
2.0
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Influence virtualenv destination pathname
  2. Exploit
    Embed U+2028 line-boundary with injected keys
  3. Execution
    stdlib venv readback merges keys into pyvenv.cfg
  4. Impact
    Isolation weakened or stdlib home redirected

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
Exploitation Conditions

Exploitation requires all of: (1) the virtualenv stdlib 'venv' creator being selected (--creator venv), which is NOT virtualenv's default builtin creator; (2) an untrusted caller able to influence the destination pathname passed to virtualenv; and (3) injection of a line-boundary character (e.g., U+2028, U+2029, newline, NEL, form-feed) into that path to smuggle keys such as 'include-system-site-packages' or 'home' into pyvenv.cfg. For the more serious 'home' impact (changing which standard-library files the interpreter loads), the attacker must ADDITIONALLY control the filesystem location referenced by the injected home value. Limiting factors: local attack vector, high complexity, the non-default creator requirement, and dependence on an application that feeds untrusted data into the environment destination path - vendor affected versions are all releases prior to 21.14.9.

Impact

This is a low-priority, defense-in-depth issue rather than an urgent threat. The vendor-supplied CVSS 4.0 vector (CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L) scores only 2.0, and every signal reinforces that: the attack is local (AV:L), high-complexity (AC:H), carries an explicit attack requirement (AT:P), needs passive user interaction (UI:P), and yields only Low confidentiality/integrity/availability impact with no scope change to subsequent systems. The PR:N rating indicates no authentication is required of the attacker, but exploitation hinges on the attacker being able to influence the destination pathname passed to virtualenv - a constrained position, not open remote access. No EPSS score was provided in the input, so exploitation probability cannot be quantified here. There is no CISA KEV listing and no public exploit was supplied (the GitHub source evidence is the fix PR #3426, not weaponized exploit code), so this is no public exploit identified at time of analysis. The signals are internally consistent - a genuinely low real-world risk - and the only caveat is the missing EPSS datapoint. Note also that the vulnerable code path is the non-default stdlib 'venv' creator; the default builtin creator is unaffected, further narrowing exposure.

Exploit ScenarioDerived

An application or script builds virtualenv environments using the stdlib venv creator and derives the destination path from untrusted input (e.g., a user-supplied project name). An attacker supplies a path containing a line-boundary character such as U+2028 followed by 'include-system-site-packages = true' or a crafted 'home' key, which virtualenv's str.splitlines() readback parses and merges into pyvenv.cfg, silently weakening environment isolation. No public proof-of-concept exploit is known; the behavior is documented only by the vendor fix.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.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

Configuration injection in PyPA virtualenv's stdlib 'venv' creator allows a caller who controls the destination pathname to smuggle arbitrary keys into the generated pyvenv.cfg by embedding a Unicode line-boundary character (such as U+2028) in that path. Successful injection can set 'include-system-site-packages' to true - weakening environment isolation - or alter 'home' so the interpreter loads standard-library files from a different location, provided the attacker also controls that location. Only the non-default stdlib venv creator (--creator venv) is affected; the builtin creator does not use the vulnerable readback path. This is a low-priority, defense-in-depth issue rather than an urgent threat (CVSS 4.0 base 2.0 / assessed CVSS 3.1 AV:L/AC:H/PR:N/UI:R, all impacts Low), fixed in virtualenv 21.14.9; no public exploit code was identified at time of analysis and there is no KEV listing.

RemediationAI

Vendor-released patch: virtualenv 21.14.9 - upgrade with 'pip install --upgrade virtualenv>=21.14.9' and confirm the installed version, then rebuild any environments created with --creator venv from untrusted destination paths. If immediate upgrade is not possible, switch environment creation to the default builtin creator (ensure the CLI/config does not specify '--creator venv'), since the affected readback-and-merge path exists only in the stdlib venv creator; the trade-off is that the builtin creator behaves differently on non-CPython interpreters (e.g., GraalPy launcher settings), so validate launcher behavior before relying on it. Additionally, sanitize destination paths in any application that programmatically invokes virtualenv, rejecting strings whose line boundaries differ from collapse_line_boundaries() - i.e., \n, \r, \v, \f, \x1c-\x1e, \x85, U+2028 and U+2029 - which may break deliberately exotic directory names but is otherwise transparent. Finally, avoid creating environments in directories writable by the untrusted caller and keep standard-library locations non-writable, which blocks the more serious 'home' redirection even if injection occurs. Details: https://github.com/pypa/virtualenv/security/advisories/GHSA-qmx5-4p3x-wvqf and https://github.com/pypa/virtualenv/releases/tag/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

virtualenv (CWE-93, improper neutralization of CRLF/line-boundary sequences) delegates environment creation to CPython's standard-library venv module when the 'venv' creator is selected. That stdlib creator writes pyvenv.cfg containing the destination pathname verbatim, then virtualenv reads the file back with str.splitlines() and merges the parsed key/value pairs over its own selected configuration. str.splitlines() treats many Unicode characters as line boundaries - \n, \r, \v, \f, \x1c (file separator), \x1d, \x1e, \x85 (NEL), U+2028 (line separator) and U+2029 (paragraph separator) - so a destination path containing one of these characters produces additional synthetic lines that are parsed as configuration keys. Keys such as 'home' and 'include-system-site-packages' can therefore influence the final interpreter configuration before output is written. The upstream fix (PR #3426, commit b0008a58885ded9227faf8f910c6c402712c750a) adds a validate_dest hook on the stdlib venv creator that rejects destinations where collapse_line_boundaries() changes the string, and stops merging the stdlib intermediate configuration, instead writing the final pyvenv.cfg from the selected interpreter and virtualenv options (with GraalPy launcher keys 'venvlauncher_command' and 'base-executable' derived from the selected interpreter). Regression tests enumerate newline, return, vertical-tab, form-feed, \x1c-\x1e, \x85, U+2028 and U+2029.

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 2.0 LOW
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.5 MEDIUM

Local vector since the attacker influences a path consumed by a local virtualenv run (AV:L); non-default creator plus required extra control over the home location make it AC:H; a user must run the creation (UI:R); impact is limited and config-scoped (C/I/A:L).

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
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:42 cve.org
LOW 2.0

DescriptionCVE.org

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the stdlib venv creator reads generated pyvenv.cfg with str.splitlines() and merges parsed keys over virtualenv's selected configuration. An untrusted caller who influences the destination pathname can include a line-boundary character such as U+2028 to inject keys including home and include-system-site-packages, causing path data to change configuration structure before final output. Setting include-system-site-packages to true weakens environment isolation, while an altered home can change which standard-library files the interpreter loads if the attacker also controls that location. The builtin creator does not use this readback path. This issue is fixed in version 21.14.9.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
High
virtualenv is among the most widely used Python environment tools
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 LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

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

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