CVE-2026-113723: virtualenv code injection in bash activation prompt

CVE-2026-113723 · Severity: high · CVSS 4 · Published 2026-10-20

virtualenv is a Python tool that creates isolated development environments. When a user activates a virtual environment with a specially crafted name, the name could execute arbitrary shell commands when the bash prompt is displayed. An attacker would need to trick a user into creating an environment with a malicious name and then activating it, allowing code execution in the user's shell session.

Technologies: Pypa Virtualenv, virtualenv (PyPI). Vendors: Pypa, PyPI.

Quick answers

Is CVE-2026-113723 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-113723 being exploited in the wild.
How severe is CVE-2026-113723?
High severity, with a CVSS score of 4, published 20 October 2026.
Which products and versions are affected?
Pypa Virtualenv before 21.14.9; virtualenv (PyPI) < 21.14.9, ECOSYSTEM:introduced=0,fixed=21.14.9.
Is there a fix for CVE-2026-113723?
Yes. virtualenv (PyPI): upgrade to 21.14.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-113723 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-113723?
Check whether you run Pypa Virtualenv or virtualenv (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • virtualenv (PyPI): upgrade to 21.14.9 or later
    pip install "virtualenv>=21.14.9"

Technical details

A code injection vulnerability exists in virtualenv's bash activation script where unsanitized prompt text is evaluated as bash syntax. The vulnerability affects versions prior to 21.14.9; attacker-controlled prompt strings containing shell metacharacters (command substitution, variable expansion) could execute as code when the prompt is rendered in bash and certain other shells (ksh93). The fix restricts prompt modification to bash and zsh shells only, properly escaping or isolating the prompt variable.

Affected products

  • PyPA virtualenv before 21.14.9

Identifiers

  • CVE-2026-113723
  • GHSA-6w3r-xr62-4xcp

Timeline

  • 2026-10-20: disclosed
  • 2026-10-17: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.