Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. virtualenv
  4. ›
  5. CVE-2026-115586

CVE-2026-115586: virtualenv: Bash activator leaves the --prompt value unescaped in PS1 when promptvars is off, so prompt expansion later executes it (regression in 21.14.9)

October 23, 2026

The bash activator puts the caller-supplied prompt value into PS1 unescaped whenever promptvars is off at activation time, and assumes prompt expansion can never run afterwards. promptvars and posix mode are runtime shell state, not a property of the activation moment: re-enabling prompt expansion in the same shell (shopt -s promptvars, set -o posix) or starting an interactive child bash that inherits the exported PS1 makes bash expand the stored value and run the command substitution in it. An attacker who controls the prompt value gets command execution as the user who sources bin/activate.

This is a regression. 21.14.8 escaped $ and the backtick unconditionally and stays inert under the same sequence. The 21.14.9 fix for GHSA-6w3r-xr62-4xcp (#3418) rewrote that block and left bash with a path that stores the raw value whenever promptvars is off.

References

  • github.com/advisories/GHSA-cx6f-vjhg-g3cc
  • github.com/pypa/virtualenv/commit/3598e201f6f044e389136b2347a8a919ac03c5f4
  • github.com/pypa/virtualenv/pull/3466
  • github.com/pypa/virtualenv/releases/tag/21.14.13
  • github.com/pypa/virtualenv/security/advisories/GHSA-cx6f-vjhg-g3cc
  • nvd.nist.gov/vuln/detail/CVE-2026-115586

Code Behaviors & Features

Detect and mitigate CVE-2026-115586 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 21.14.9 before 21.14.13

Fixed versions

  • 21.14.13

Solution

Upgrade to version 21.14.13 or above.

Impact 7 HIGH

CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

pypi/virtualenv/CVE-2026-115586.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:26 +0000.