# CVE-2026-113725: virtualenv bash activate script command injection in PS1

Source: https://junglewise.ai/threats/cve-2026-113725-virtualenv-is-a-tool-for-creating-isolated-virtual-python  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-20. Updated: 2026-10-20  
License: CC BY 4.0 with a link back

CVE-2026-113725 · Severity: high · CVSS 7.8 · Published 2026-10-20

virtualenv is a Python tool that creates isolated development environments. The bash activation script improperly escapes special characters in environment names, allowing attackers to inject shell commands that execute whenever a user's shell prompt is drawn. An attacker who can control the virtualenv name (via --prompt or VIRTUALENV_PROMPT variable) can achieve arbitrary command execution in the user's shell.

Technologies: [Pypa Virtualenv](https://junglewise.ai/threats/technologies/pypa-virtualenv), [virtualenv (PyPI)](https://junglewise.ai/threats/technologies/virtualenv). Vendors: [Pypa](https://junglewise.ai/threats/vendors/pypa), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-113725 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-113725 being exploited in the wild.

**How severe is CVE-2026-113725?** High severity, with a CVSS score of 7.8, published 20 October 2026.

**Which products and versions are affected?** Pypa Virtualenv prior to 21.14.7; virtualenv (PyPI) <= 21.14.6, ECOSYSTEM:introduced=0,fixed=21.14.7.

**Is there a fix for CVE-2026-113725?** Yes. virtualenv (PyPI): upgrade to 21.14.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-113725 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-113725?** 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.7 or later

  ```sh
  pip install "virtualenv>=21.14.7"
  ```


## Technical details

The bash activate script failed to escape the environment name for both passes that bash makes over the PS1 variable. A name containing \$(...) or backticks can bypass escaping and execute arbitrary commands in the user's shell each time the prompt is rendered. This affects all virtualenv versions prior to 21.14.7; versions before 21.13.0 had no escaping at all. The fix adds double-escaping of backslashes, dollar signs, and backticks in the bash activator.

## Affected products

- PyPA virtualenv prior to 21.14.7

## Identifiers

- CVE-2026-113725
- GHSA-vxj4-q4g9-crj7

## Timeline

- 2026-10-20: disclosed
- 2026-10-12: patched: Version 21.14.7 released

## References

- [https://github.com/pypa/virtualenv/commit/c3104e02474b652832a9bbaae79f6e1696296932](https://github.com/pypa/virtualenv/commit/c3104e02474b652832a9bbaae79f6e1696296932)
- [https://github.com/pypa/virtualenv/releases/tag/21.14.7](https://github.com/pypa/virtualenv/releases/tag/21.14.7)

## Related threats

- [virtualenv bash activate command injection via unescaped prompt](https://junglewise.ai/threats/cve-2026-115586-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [virtualenv command injection in activation script template substitution](https://junglewise.ai/threats/cve-2026-113776-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [virtualenv command injection in Fish shell activation script](https://junglewise.ai/threats/cve-2026-113732-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [pypa virtualenv command injection in bash activate script](https://junglewise.ai/threats/cve-2026-113726-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
- [virtualenv safe_delete symlink mode change vulnerability](https://junglewise.ai/threats/cve-2026-113724-virtualenv-is-a-tool-for-creating-isolated-virtual-python)
