The vulnerability is a command injection in the bash activation script of virtualenv. The root cause is in the prompt-handling block of src/virtualenv/activation/bash/activate.sh. When the script is sourced and promptvars is off (or posix mode is not active), the code takes the else branch and builds PS1 from VIRTUAL_ENV_PROMPT using only backslash doubling (_VIRTUAL_PROMPT="${VIRTUAL_ENV_PROMPT//\\/\\\\}"), without escaping $ or backticks for bash. The zsh branch (and the pre-21.14.9 code) escaped $ and backticks, but the regression commit 5f48d711 removed that escaping from the bash path. Because promptvars/posix mode are runtime shell state that can change after activation (or a child shell inherits the exported PS1 with promptvars on by default), the raw $(...)/backtick content in PS1 is later expanded, executing attacker-controlled commands as the activating user. The fix (commit 3598e201) escapes $, backtick, and backslash for bash in all states, and switches zsh to a psvar-based approach. The vulnerable function is the top-level activate script (the prompt block runs at source time, not inside a named function), with deactivate being a mitigation-related function modified by the patch.