Intel

AIKIDO-2026-674766

virtualenv is vulnerable to OS Command Injection

CVE-2026-102925Published Sep 22, 2026
September 22, 2026

78

CVE Score

High

OS Command Injection

Are you affected? Scan for Free

TL;DR

The generated bash activate script and activate.fish script interpolate a shlex.quote-ed path into a position that is quoted a second time, so the extra quotes terminate early and leave part of the value parsed as shell code. In activate, this triggers on the branch that reports a relocated virtual environment, so a virtual environment path containing $(...), backticks, or ; runs commands when a user sources the script. In activate.fish, the same double quoting around the TCL_LIBRARY and TK_LIBRARY paths lets a parenthesized command substitution in the interpreter's library path execute on source. The fix moves the placeholders outside the surrounding quotes so each value keeps only its original shlex.quote quoting.

How do I fix this?

Upgrade the virtualenv library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you source a bash or fish activate script for a virtual environment whose path, or whose interpreter's Tcl/Tk library path, can contain untrusted shell metacharacters.

Package

Versions

0.8.0 - 21.7.12

Fixed in 21.7.13

Background info

virtualenv is vulnerable to OS Command Injection in versions 0.8.0 - 21.7.12.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea