HIGHCVSS v3.1 7.8Vulnerability

CVE-2026-113726

### Impact zsh users activate an environment with the bash `activate` script, which puts the environment name into `PS1`. Since 21.13.0 the script escapes backslashes, dollar signs and backticks in that name, but only when `BASH_VERSION` is set, so zsh gets the raw value. With the `PROMPT_SUBST` option set, zsh runs parameter expansion, command substitution and arithmetic expansion on `PS1` each time it draws the prompt. A name that contains `$(...)`, backticks or `${...}` then runs as commands in the user's shell, once per prompt. The name comes from the environment directory, or from `--prompt` or `VIRTUALENV_PROMPT`. After you create an environment with: ```console $ virtualenv 'x$(touch PWNED)y' ``` `source 'x$(touch PWNED)y/bin/activate'` in a zsh session with `PROMPT_SUBST` set creates `PWNED`, and the prompt shows `(xy)`. Passing that value as `--prompt` to an environment with a plain name has the same effect. Without `PROMPT_SUBST`, zsh shows the name as text and runs nothing. bash runs nothing either. A plain zsh starts with `PROMPT_SUBST` off. oh-my-zsh users have it on: oh-my-zsh loads [`lib/theme-and-appearance.zsh`](https://github.com/ohmyzsh/ohmyzsh/blob/4d4cfc287e9d887b81242c0e431b5f49f9cec5c1/lib/theme-and-appearance.zsh#L5) at startup, and that file sets it. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive. `--prompt .` takes the current directory's name. zsh also reads `%` in `PS1` as a prompt escape, so a name with `%n` showed the user name in place of those characters, though without running commands. The bug is in releases up to and including 21.14.3. The payload runs on 20.26.6 and 21.14.3, and the reporter confirmed 21.9.1. ### Patches Fixed in 21.14.4. Under zsh, `activate` now escapes the name the way it does under bash and doubles `%`, so the example above runs nothing and the prompt sh

Properties

Summary
virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST
Severity
high
Nvd fetched at
2026-10-22T22:14:18.200859+00:00
Epss score
0.00234
Cvss score
7.8
Cvss severity
HIGH
Retrieved at
2026-10-22T22:17:33+00:00
Ghsa published
2026-10-21T16:46:23Z
Source url
https://github.com/advisories/GHSA-5vjq-rrrf-7h2q
Ghsa updated
2026-10-21T16:46:24Z
Ghsa id
GHSA-5vjq-rrrf-7h2q
Last source
FIRST EPSS
Score
7.8
Cvss version
3.1
Cve id
CVE-2026-113726
Cvss vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
First seen by Signal
2026-10-21T17:40:10+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published at
2026-10-20T22:19:29.423

Related Entities (4)

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-113726 (CVSS v3.1 7.8) — Ninja Signal Threat Intelligence | Ninja Signal