virtualenv is vulnerable to OS Command Injection
78
High Risk
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.
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.
virtualenv is vulnerable to OS Command Injection in versions 0.8.0 - 21.7.12.
Upgrade the virtualenv library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.