Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-113726— virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST

Quick assessment

Affected
pypa virtualenv
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

virtualenv 是一个用于创建隔离的 Python 虚拟环境的工具。在 21.13.0 之前,由 zsh 同样加载的 bash 激活脚本未对环境名称进行转义;从 21.13.0 到 21.14.4 版本,该脚本仅在设置了 BASH_VERSION 变量时才对反斜杠、美元符号和反引号进行转义,导致 zsh 接收到未转义的原始值。该脚本会将此值赋值给 PS1 变量。因此,在启用了 PROMPT_SUBST 的 zsh 环境中,如果攻击者能够影响环境目录名称、--prompt 参数或 VIRTUALENV_PROM

CVSS 7.8 · High
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-113726

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
OS命令中使用的特殊元素转义处理不恰当(OS命令注入)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
pypa virtualenv < 21.14.4 -

II. Public POCs for CVE-2026-113726

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-113726

请登录查看更多情报信息。

Other References for CVE-2026-113726 (3)

Same Patch Batch · pypa · 2026-10-20 · 16 CVEs total

CVE-2026-113722 7.8 HIGH virtualenv: Generated POSIX console launchers interpret destination paths as shell syntax
CVE-2026-113725 7.8 HIGH virtualenv bash activate runs commands from an environment name with a backslash before $
CVE-2026-113776 7.8 HIGH virtualenv activation scripts run code from a path that contains a placeholder name
CVE-2026-113732 7.8 HIGH virtualenv activate.fish runs commands from a path or prompt with a backslash before a quo
CVE-2026-113718 7.1 HIGH virtualenv: Xonsh activation literals depend on the script decoding codec
CVE-2026-113723 7.1 HIGH virtualenv: Bash prompt values can change meaning under older compatibility modes
CVE-2026-113716 4.5 MEDIUM virtualenv: Builtin creation follows linked environment directories
CVE-2026-113719 4.5 MEDIUM virtualenv: Seed replacement does not contain metadata deletion paths
CVE-2026-113724 4.5 MEDIUM virtualenv: Deletion recovery can change a symlink target's mode
CVE-2026-113721 4.5 MEDIUM virtualenv: Generated files can follow existing destination links
CVE-2026-113713 4.4 MEDIUM virtualenv: Temporary app-data can leave dangling seed package links
CVE-2026-113720 4.4 MEDIUM virtualenv: Seeded files retain permissions from an older cache
CVE-2026-113714 2.3 LOW virtualenv: Downloaded wheel selection and caching precede verification
CVE-2026-113717 2.3 LOW virtualenv: Pip seeding with download omits wheel digest verification
CVE-2026-113715 2.0 LOW virtualenv: Venv configuration readback can reinterpret path boundaries

IV. Related Vulnerabilities

V. Comments for CVE-2026-113726

No comments yet


Leave a comment