Skip to main content

CVE-2026-113732: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pypa virtualenv

0
High
VulnerabilityCVE-2026-113732cvecve-2026-113732cwe-78cwe-116
Published: 10/20/2026 (10/20/2026, 22:01:23 UTC)
Source: CVE Database V5
Vendor/Project: pypa
Product: 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

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

pypa

virtualenv

Affected versions
<21.14.2
virtualenv
pkg:pypi/virtualenv
Affected versions
<21.14.2

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

AILast updated: 10/20/2026, 22:48:25 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses