
Key points
- virtualenv versions up to 21.14.3 are vulnerable to CVE-2026-113726.
- The fix is available in virtualenv version 21.14.4.
- The flaw primarily affects Zsh users with specific prompt settings enabled.
Small-business IT teams using Python development tools should update virtualenv to version 21.14.4 immediately. This release addresses a high-severity command injection vulnerability identified as CVE-2026-113726. The flaw allows attackers to run arbitrary commands on a user's system if specific conditions are met during environment activation.
In plain English
The issue occurs when a developer activates a Python virtual environment using the Zsh shell. The activation script places the environment name into the command prompt display. If the environment name contains special characters like dollar signs or backticks, Zsh may interpret them as commands rather than text. This happens specifically when the shell has prompt substitution enabled, which is common in popular configurations like oh-my-zsh.
The background
According to the GitHub security advisory, the bug exists in virtualenv releases up to and including version 21.14.3. The problem stems from how the bash activate script handles escaping for Zsh users. It only escapes dangerous characters when the BASH_VERSION variable is set, which is not the case in Zsh. Consequently, raw values are passed to the shell, allowing parameter expansion and command substitution to execute code every time the prompt is drawn.
What changes now
Version 21.14.4 of virtualenv includes a patch that resolves this issue. The updated script now escapes environment names in Zsh the same way it does in Bash. It also doubles percent signs to prevent prompt escape sequences from being interpreted. This ensures that environment names containing special characters are displayed as plain text and do not trigger command execution.
Who needs to act first
Teams should prioritize updating systems where developers use Zsh with popular framework configurations, as these are most likely to have prompt substitution enabled. Before rolling out the update to all workstations, test the new version in a isolated environment to ensure it does not break existing scripts or workflows. Back up current development environments before applying changes. If immediate updating is not possible, advise staff to avoid using environment names with special characters and to verify that prompt substitution is disabled where feasible.
What to do and how to stay safe: virtualenv
- Check all development machines and CI servers for installed versions of virtualenv and identify those at 21.14.3 or lower.
- Update to virtualenv 21.14.4 or later once the vendor provides an update to ensure the patch is applied.
- Audit recent environment creation logs for any names containing special characters like dollar signs or backticks.
- Monitor shell logs for unexpected command executions or file creations that could indicate exploitation of this flaw.
Step-by-step guide: Out-of-Band Patches: Meaning, Risks, and Deployment Reality
General security guidance from the Patch Herald newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
Which versions of virtualenv are vulnerable to this command injection?
Versions up to and including 21.14.3 are vulnerable, with confirmed exploitation on versions 20.26.6, 21.9.1, and 21.14.3.
Does this affect Bash users?
No, Bash users are not affected because the script correctly escapes dangerous characters when BASH_VERSION is set.
Is there a fix available for this vulnerability?
Yes, the issue is fixed in virtualenv version 21.14.4, which properly escapes names for Zsh environments.



