Command Injection Affecting virtualenv package, versions [21.14.8,21.14.9)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.29% (21st 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-21282488
  • published21 Oct 2026
  • disclosed20 Oct 2026
  • creditAnthropic's OSS Scanner

Introduced: 20 Oct 2026

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

How to fix?

Upgrade virtualenv to version 21.14.9 or higher.

Overview

Affected versions of this package are vulnerable to Command Injection via the seed mechanism's console script launcher rewriting logic in pip_invoke.py on POSIX systems. When a virtual environment is created and pip installs packages with console scripts, the interpreter path embedded in script shebangs may contain spaces, causing pip to generate a /bin/sh-based wrapper shebang. The _rewrite_launchers method rewrites these scripts to use the correct interpreter path but does so by unlinking and recreating the file, which can allow a local attacker with write access to the script directory to replace the file between the unlink and open calls, potentially gaining elevated execution privileges through the recreated script.

CVSS Base Scores

version 4.0
version 3.1