CVE-2026-113732: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pypa virtualenv
Description
CVE-2026-113732 is an OS command injection vulnerability in pypa virtualenv versions prior to 21.14.2. The issue arises because FishActivator inherits a quoting method that uses POSIX shlex.quote(), which does not correctly handle Fish shell's interpretation of backslashes and single quotes. An attacker-controlled environment path, --prompt, or VIRTUALENV_PROMPT containing a backslash before a quote can break the intended quoting and allow command substitution when sourcing activate.fish. This vulnerability is fixed in version 21.14.2.
CVSS v3.1
Score 7.8high
Affected software
pypa
virtualenv
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
Technical Analysis
The vulnerability in pypa virtualenv (before 21.14.2) involves improper neutralization of special elements used in OS commands (CWE-78). Specifically, FishActivator inherits ViaTemplateActivator.quote(), which uses POSIX shlex.quote() for quoting strings. However, Fish shell interprets backslashes and single quotes differently than POSIX shells. If an attacker controls environment variables such as the environment path, --prompt option, or VIRTUALENV_PROMPT and includes a backslash before a quote, this can prematurely terminate the quoted string in the generated activate.fish script. This allows execution of arbitrary commands via command substitution when the user sources the activate.fish script. The issue is resolved in virtualenv version 21.14.2.
Potential Impact
Successful exploitation can lead to arbitrary command execution with the privileges of the user sourcing the activate.fish script. This can result in full compromise of the user's environment, including confidentiality, integrity, and availability impacts as indicated by the CVSS vector (C:H/I:H/A:H). The attack requires user interaction (sourcing the script) and local access to influence environment variables or command-line options.
Mitigation Recommendations
Upgrade virtualenv to version 21.14.2 or later, where this vulnerability is fixed. No other mitigations are specified or recommended by the vendor. Users should avoid sourcing activate.fish scripts generated by vulnerable versions with untrusted environment variables or prompts.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-20T16:03:14.864Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ad7e8e52cdf04f656695f7b
Added to database: 10/20/2026, 22:19:17 UTC
Last enriched: 10/20/2026, 22:48:25 UTC
Last updated: 10/20/2026, 22:48:25 UTC
Views: 7
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.