CVE-2026-113726: Poetry · virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST
Affects poetrySource GCVE Database
Not known to be exploited · CVSS 7.8 High : upgrade to 2.5.1_1 or 1.2.2_1 soon.
Data as of 30 Oct 2026, 08:17 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 7.8 |
|---|
- Patch
- Available – fixed in 2.5.1_1, 1.2.2_1
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 20 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade poetry to 2.5.1_1 or 1.2.2_1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewpoetrypkg:brew/poetryOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in Poetry versions 1.2.2_1 and 2.5.1_1 which properly escapes the environment name in the prompt for zsh users. Users should upgrade to these versions or later. As a workaround, users can set the environment variable VIRTUAL_ENV_DISABLE_PROMPT=1 before sourcing activate to prevent modification of PS1, or disable PROMPT_SUBST in zsh by running 'unsetopt prompt_subst' if not needed. Users should also verify environment names before activation to avoid malicious names.
Description
A command injection vulnerability exists in the Poetry virtual environment activation script for zsh users with the PROMPT_SUBST option enabled. The vulnerability arises because the environment name is inserted into the shell prompt (PS1) without proper escaping under zsh, allowing crafted environment names containing command substitution syntax to execute arbitrary commands each time the prompt is drawn. This affects Poetry versions prior to 1.2.2_1 and 2.5.1_1. The issue is fixed in version 1.2.2_1 and 2.5.1_1 by properly escaping special characters in the prompt string.
References
- github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-113726 (opens in a new tab)
- github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2 (opens in a new tab)
- github.com/pypa/virtualenv (opens in a new tab)
- github.com/pypa/virtualenv/releases/tag/21.14.4 (opens in a new tab)