Skip to main content
VulnerabilityPublished

CVE-2026-113725: Poetry · virtualenv bash activate runs commands from an environment name with a backslash before $

Affects poetrySource GCVE Database

0
Compare
Authoritative record:CVE-2026-113725· High 7.8

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

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Oct 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Homebrewpoetrypkg:brew/poetryOther threatsAffected
  • >=1.1.0 <1.2.2_1
  • >=1.8.0 <2.5.1_1
Fixed in
  • 1.2.2_1
  • 2.5.1_1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Apply the official patch by upgrading Poetry's virtualenv component to version 1.2.2_1 or 2.5.1_1 or later, where the issue is fixed. Alternatively, set the environment variable VIRTUAL_ENV_DISABLE_PROMPT=1 before sourcing the activate script to prevent modification of PS1. Another mitigation is to disable bash prompt variable expansion by running 'shopt -u promptvars' if prompt expansion is not needed. Always verify the environment name before sourcing activate scripts from untrusted sources.

Description

A command injection vulnerability exists in the bash activate script of virtual environments created by Poetry's virtualenv component. The vulnerability arises because the environment name is not properly escaped during both passes bash makes over the PS1 prompt variable, allowing specially crafted environment names containing backslash-dollar sequences to execute arbitrary commands each time the shell prompt is drawn. This affects users who source the activate script of an environment with an attacker-controlled name. The issue is fixed in Poetry virtualenv versions 1.2.2_1 and 2.5.1_1.

References

Community reviews

Loading reviews…