Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInfluence virtualenv destination pathname
-
ExploitEmbed U+2028 line-boundary with injected keys
-
Executionstdlib venv readback merges keys into pyvenv.cfg
-
ImpactIsolation 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
More in Virtualenv
View allvirtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Rated high
virtualenv versions prior to 21.7.12 cache and seed pip/setuptools wheels without verifying their bytes, so an attacker
Configuration injection in PyPA virtualenv before 21.7.11 lets a line boundary embedded in a prompt value inject extra k
Command injection in PyPA virtualenv before 21.14.9 lets an attacker who controls the destination path of a virtual envi
Command injection in virtualenv's bash activation script prior to 21.14.7 allows a crafted environment name or --prompt
Command injection in the bash, zsh, and fish activation scripts generated by virtualenv releases prior to 21.7.13 lets a
Command injection in PyPA virtualenv before 21.7.12 allows an attacker who controls the environment's prompt value - via
Command injection in virtualenv's bash activator lets an attacker-supplied --prompt value be stored unescaped in PS1 and
Caller-influenced prompt text in virtualenv's bash activation script prior to 21.14.9 can be re-expanded by bash as exec
A code injection flaw in PyPA virtualenv before 21.14.9 lets attacker-influenced non-ASCII characters in the xonsh promp
Symlink following in virtualenv's safe_delete() deletion-error handler (all versions prior to 21.14.9) lets a local atta
Symlink-following file writes in virtualenv before 21.14.9 let a second, unprivileged local account redirect generated e
EUVD-2026-105301
GHSA-qmx5-4p3x-wvqf
NVD
CVE.org
EPSS
Exploit-DB