Command Injection Affecting virtualenv package, versions [20.26.6,21.14.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.27% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-VIRTUALENV-21282339
  • published21 Oct 2026
  • disclosed21 Oct 2026
  • creditKevin Stubbings

Introduced: 21 Oct 2026

NewCVE-2026-113776  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade virtualenv to version 21.14.2 or higher.

Overview

Affected versions of this package are vulnerable to Command Injection via instantiate_template in src/virtualenv/activation/via_template.py, which replaces placeholders one at a time across the entire activation script template. When a path component (such as a parent directory) is named __VIRTUAL_NAME__, the already-quoted value containing that placeholder name is rewritten by a subsequent substitution pass, causing the second value's quotes to close the first and allowing the remainder of the path to run as arbitrary code in bash, fish, xonsh, and activate_this.py. In csh, the same sequential substitution breaks prompt display tokens in activate.csh the same way.

CVSS Base Scores

version 4.0
version 3.1