CVE-2026-113726
Awaiting Analysis Awaiting Analysis - Queue

Command Injection in Virtualenv via PS1 Prompt Handling

Vulnerability report for CVE-2026-113726, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-20

Last updated on: 2026-10-27

Assigner: GitHub, Inc.

Description

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.13.0, the bash activate script that zsh also sources leaves the environment name unescaped; from 21.13.0 until 21.14.4, it escapes backslashes, dollar signs, and backticks only when BASH_VERSION is set, so zsh receives the raw value. The script assigns that value to PS1. In zsh with PROMPT_SUBST, an attacker-influenced environment directory, --prompt, or VIRTUALENV_PROMPT value containing command, parameter, or arithmetic expansion syntax can therefore execute commands in the user's shell each time the prompt is drawn. A percent sign is separately interpreted as a zsh prompt escape but does not by itself execute commands. Plain zsh with PROMPT_SUBST disabled and bash are not affected by this mechanism. This issue is fixed in version 21.14.4.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-20
Last Modified
2026-10-27
Generated
2026-11-10
AI Q&A
2026-10-21
EPSS Evaluated
2026-11-08
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
pypa virtualenv < 21.14.4

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
CWE-116 The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

The vulnerability in virtualenv affects the bash activate script used by zsh. It improperly escapes certain characters in the environment name, which is assigned to PS1. This allows command execution in the user's shell when the prompt is drawn, if the environment directory or prompt contains specific syntax like command expansions.

Detection Guidance

Check the version of virtualenv installed on your system. If it is below 21.14.4, the system is vulnerable. Run: virtualenv --version. If the output is less than 21.14.4, the vulnerability is present.

Impact Analysis

An attacker could exploit this to execute arbitrary commands on your system whenever your shell prompt is displayed. This could lead to unauthorized access, data theft, or further compromise of your system, depending on the attacker's goals.

Compliance Impact

This vulnerability does not directly affect compliance with GDPR, HIPAA, or similar standards. It is a local privilege escalation issue in the virtualenv tool that could allow command execution in a user's shell under specific conditions. Compliance impacts would only occur if this vulnerability were exploited to gain unauthorized access to sensitive data, which is not described in the provided context.

Mitigation Strategies

Upgrade virtualenv to version 21.14.4 or later. Use pip install --upgrade virtualenv. After upgrading, verify the version again with virtualenv --version.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-113726. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...