Charmbracelet wish versions before 2.0.5 have a path traversal vulnerability in the git middleware component. This flaw allows authenticated SSH users to bypass directory containment checks by using crafted repository paths with relative directory references. Exploitation enables reading or writing arbitrary repositories outside the intended root directory via git-upload-pack, git-upload-archive, or git-receive-pack.
A vulnerability in virtualenv's bash activation prompt allows attacker-controlled prompt text to be interpreted as executable syntax under certain older bash compatibility modes (4.2 and lower) and specific shell scenarios involving dash. This can lead to command execution when the user activates the environment and the prompt is drawn. The issue arises because the prompt string is assigned to PS1 and then expanded again by the shell, with some paths not properly escaping or sanitizing the prompt content. The vulnerability affects virtualenv versions starting from 20.0.0b1 with certain changes introduced in 21.14.7 and confirmed in 21.14.8. Exploitation requires attacker influence over the prompt argument and user activation of the environment in a vulnerable shell context.
The filelock ReadWriteLock and AsyncReadWriteLock components use SQLite databases for locking, but on Linux and other POSIX systems, SQLite reopens the lock database by name following symlinks and acting on side files such as -journal, -wal, and -shm. This behavior allows a local attacker who can create or rename files in the directory holding the lock database (if it is world- or group-writable without the sticky bit) to manipulate the lock user's files by planting symlinks or journal files. This can lead to arbitrary writes, file creation or deletion, and denial of lock acquisition, all with the lock user's privileges. The vulnerability affects filelock versions from 3.20.4 through 4.2.0, with the /proc/self/fd redirect introduced in 4.0.9. The CVSS 3.1 score is 7.1 (High).
A vulnerability in the filelock Python library's ReadWriteLock and AsyncReadWriteLock components allows a local user to cause denial of service by placing a crafted SQLite database file at the lock path. This crafted file causes every acquire operation on the lock to stall indefinitely or hang, ignoring configured timeouts and blocking flags. The issue affects filelock versions 3.20.4 through 4.2.0 and requires the attacker to have write or replace permissions on the lock database file or directory. The impact is limited to availability; no confidentiality or integrity breach occurs.
A symlink swap vulnerability in the SoftFileLock implementation of filelock versions 3.32.6 through 4.2.0 allows a local user with write access to the lock directory to leak one bit of information about the existence and writability of arbitrary paths. This occurs due to a time-of-check to time-of-use (TOCTOU) race condition between os.lstat and os.access calls, where the latter follows symlinks. The leak is limited to one bit per acquire attempt and requires high attack complexity, including a second CPU and observation of the lock user's acquire outcome. Linux kernel setting fs.protected_symlinks mitigates this in sticky world-writable directories like /tmp, but not in non-sticky or group-writable sticky directories. The vulnerability has low severity with no integrity or availability impact.
The filelock library versions 3.30.0 through 4.2.0 have a vulnerability in StrictSoftFileLock and AsyncStrictSoftFileLock where claim directories are created without restrictive permissions, allowing other local users with write access to these directories to unlink claim files. This can lead to multiple holders believing they have exclusive locks, causing integrity issues. The vulnerability requires a local attacker with write permissions on the lock's parent directory and a specific environment configuration involving umask or default ACLs. The CVSS score is 5.3 (Medium), reflecting a local attack with high complexity but low privileges and no confidentiality impact.
A command injection vulnerability exists in the virtualenv tool for Python prior to version 21.14.4. The issue arises from improper escaping of environment names in the bash activate script, which zsh also sources. This allows an attacker to execute arbitrary commands in the user's shell prompt when using zsh with PROMPT_SUBST enabled. The vulnerability is fixed in version 21.14.4.
CVE-2026-113776 is an OS command injection vulnerability in pypa virtualenv versions from 20.26.6 up to but not including 21.14.2. The issue arises from the way ViaTemplateActivator.instantiate_template() replaces placeholders in activation templates, allowing crafted values in environment paths or prompts to break out of quoting and execute arbitrary commands when activating the environment. This affects activation scripts for bash, fish, xonsh, and activate_this.py. The vulnerability is fixed in version 21.14.2.
A command injection vulnerability exists in pypa virtualenv versions prior to 21.14.2. The issue arises because FishActivator inherits a quoting method that uses POSIX shlex.quote(), which is incompatible with the fish shell's interpretation of backslashes and single quotes. An attacker can craft environment variables such as the path, --prompt, or VIRTUALENV_PROMPT containing a backslash before a quote to break out of the fish literal and execute arbitrary commands when the user sources activate.fish. This vulnerability is fixed in version 21.14.2.
CVE-2026-113725 is an OS command injection vulnerability in the bash activate script of pypa virtualenv versions prior to 21.14.7. The vulnerability arises because the environment name used in the PS1 prompt is not properly escaped for both passes bash makes over PS1, allowing specially crafted environment names containing backslash and command substitution sequences to execute arbitrary commands in the user's shell. This affects users who source the activate script of an environment with an attacker-controlled name. The issue is fixed in version 21.14.7.
CVE-2026-113724 is a vulnerability in pypa virtualenv prior to version 21.14.9. The issue involves the safe_delete() error handler following symbolic links when attempting to change permissions after a failed deletion. This behavior can cause a victim-owned target outside the intended directory to become writable by others if certain conditions are met. The vulnerability is fixed in version 21.14.9.
CVE-2026-113722 is an OS command injection vulnerability in pypa virtualenv versions prior to 21.14.9. The issue arises from incomplete quoting of interpreter paths containing spaces or long shebangs when generating POSIX console scripts, allowing command substitutions to be executed. This can lead to arbitrary command execution with the user's privileges when running a generated launcher. Existing launchers remain vulnerable even after upgrading virtualenv and must be regenerated. The vulnerability is fixed in version 21.14.9.
CVE-2026-113716 is a vulnerability in pypa virtualenv versions prior to 21.14.9 where the builtin environment creator accepts existing directory symlinks during directory preparation. This allows writes outside the intended environment directory through symlinked paths, potentially enabling an attacker with limited access to plant files or executables in locations like ~/.local/bin. The issue arises because ensure_dir() follows symlinks and writes environment files through them, bypassing intended directory boundaries. The vulnerability was fixed in version 21.14.9.
`download_wheel()` runs `pip download` and hands the result straight to the seeder, with nothing checking the bytes it gets back. The embedded pip and setuptools wheels carry a `BUNDLE_SHA256` that virtualenv checks on every load, but a wheel fetched over the network for the periodic-update feature or the `--download` flag had no equivalent verification.
A compromised index, a stale mirror, or a MITM'd download (when TLS is intercepted, e.g. via a misconfigured or malicious CA) could substitute a different wheel under the same distribution/version/filename, and virtualenv would cache and seed it into every environment created afterward with no warning.
Fixed by computing the downloaded wheel's sha256 and comparing it against the digest PyPI's public JSON API reports for that exact release, independent of which index actually served the file. The check is skipped, not treated as failure, when a custom index (`PIP_INDEX_URL`, `PIP_EXTRA_INDEX_URL`, `PIP_INDEX`) is configured, since a private index can legitimately serve a different, intentionally rebuilt wheel. Fix: https://github.com/pypa/virtualenv/pull/3251
### Impact
The generated `activate` (bash/zsh) and `activate.fish` scripts interpolate a `shlex.quote`-ed value into a position that quotes it a second time. The extra quotes terminate the quoted run early and leave part of the value parsed as shell code, so a path containing shell metacharacters runs commands when a user sources the activation script.
`activate` is affected through the virtual environment's own path, on the branch that reports a relocated environment:
```sh
echo "Virtual environment directory __VIRTUAL_ENV__ does not exist!" >&2
```
For a destination named `x'$(id)'y`, `shlex.quote` emits `'x'"'"'$(id)'"'"'y'`. The inner `"` closes the enclosing double quote and `$(id)` is left unquoted. Backtick and `;` payloads reach the same result. This branch runs whenever the recorded path is absent, which is the normal case for a virtual environment copied or distributed to another machine.
`activate.fish` is affected through the interpreter's Tcl/Tk library paths:
```fish
set -gx TCL_LIBRARY '__TCL_LIBRARY__'
```
`shlex.quote` already returns `'/tcl/(cmd)/lib'`, so the rendered line is `''/tcl/(cmd)/lib''`. fish concatenates the adjacent quoted runs and expands the `(cmd)` left between them. The same doubling also splits a path containing a space into two list elements, corrupting `TCL_LIBRARY` and `TK_LIBRARY`.
This is the same defect class as GHSA-x78j-v8h9-3j2q, which covered `activate.bat`.
### Patches
Fixed in 21.7.13 by moving the placeholders outside the surrounding quotes, so each value keeps only the quoting `shlex.quote` applied. Fix: https://github.com/pypa/virtualenv/pull/3252
### Workarounds
Avoid creating or distributing virtual environments whose path contains `'`, `` ` ``, `$`, `;`, `(` or `)`, and inspect the generated activation script before sourcing one you did not create.