unstale

pypi / virtualenv

virtualenv

What changed in virtualenv 20 to 21, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-29.

1 breaking24 security9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

virtualenv 2133 changes

Breaking changes 1

  • The standalone zipapp bundles dependencies for Python 3.15 and no longer bundles Python 3.8, which is outside the supported range.

    21.15.0release notes

Security 23

  • Prevent prompt or environment-name content from running as shell commands; zsh now draws the prompt from psvar[9], which is never parsed as shell syntax.

    21.14.13release notes

  • Create the .venv redirect and wheel RECORD exclusively to prevent a planted link from redirecting writes; on POSIX, replace a read-only .venv redirect that points at a virtualenv.

    21.14.13release notes

  • virtualenv: Bash activator leaves the --prompt value unescaped in PS1 when promptvars is off, so prompt expansion later executes it (regression in 21.14.9)

    21.14.13security advisory

  • virtualenv: Temporary app-data can leave dangling seed package links

    21.14.10security advisory

  • virtualenv: Bash prompt values can change meaning under older compatibility modes

    21.14.9security advisory

  • virtualenv: Builtin creation follows linked environment directories

    21.14.9security advisory

  • virtualenv: Deletion recovery can change a symlink target's mode

    21.14.9security advisory

  • virtualenv: Downloaded wheel selection and caching precede verification

    21.14.9security advisory

  • virtualenv: Generated files can follow existing destination links

    21.14.9security advisory

  • virtualenv: Generated POSIX console launchers interpret destination paths as shell syntax

    21.14.9security advisory

  • virtualenv: Pip seeding with download omits wheel digest verification

    21.14.9security advisory

  • virtualenv: Seed replacement does not contain metadata deletion paths

    21.14.9security advisory

  • virtualenv: Seeded files retain permissions from an older cache

    21.14.9security advisory

  • virtualenv: Venv configuration readback can reinterpret path boundaries

    21.14.9security advisory

  • virtualenv: Xonsh activation literals depend on the script decoding codec

    21.14.9security advisory

  • virtualenv bash activate runs commands from an environment name with a backslash before $

    21.14.7security advisory

  • virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST

    21.14.4security advisory

  • virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote

    21.14.2security advisory

  • virtualenv activation scripts run code from a path that contains a placeholder name

    21.14.2security advisory

  • virtualenv bash and fish activation scripts execute commands embedded in paths

    21.7.13security advisory

  • virtualenv: Command injection via --prompt in activate.bat (batch activator)

    21.7.12security advisory

  • virtualenv: Downloaded seed wheels (pip/setuptools) are not integrity-checked before use

    21.7.12security advisory

  • virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection

    21.7.11security advisory

Fixes and other changes 9

  • Seeded console_scripts entries containing digits that do not end in a version keep their full names, preventing names such as python3-config from overwriting the environment's python executable.

    21.15.1release notes

  • Count -p once rather than once per internal parsing pass.

    21.15.1release notes

  • Count -q once rather than once per internal parsing pass.

    21.15.1release notes

  • When symlink seeding is enabled on a host that cannot create symlinks, copy the seed packages instead of failing.

    21.15.1release notes

  • Copy the content of a symlinked directory when copying a tree into an environment, instead of dropping it.

    21.15.1release notes

  • Count --try-first-with once rather than once per internal parsing pass.

    21.15.1release notes

  • Count -v once rather than once per internal parsing pass, so Session.verbosity reflects the supplied option.

    21.15.1release notes

  • When symlink seeding is enabled on a host that cannot create symlinks, copy the seed packages instead of failing.

    21.15.1release notes

  • Collect target interpreter debug information without PYTHONPATH and with the environment passed to cli_run, so reported sys.path no longer includes the caller's PYTHONPATH entries.

    21.15.1release notes

virtualenv 201 changes

Security 1