Skip to content

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

Open

Description

@hroncok

Summary

Hello uv folks.

In Fedora, we have triaged several already disclosed CVEs from pypa/virtualenv as they were reported to the uv package as well (reasons not important, happy to explain). With LLM (Claude Sonnet 5) I have found that CVE-2026-113726 is reproducible in uv 0.13.6 on Fedora Linux.

pypa/virtualenv@5b91536

Same underlying gap as CVE-2026-113723 reported in #23058: uv's activate script has no zsh-specific escaping either, so the PROMPT_SUBST re-expansion case this commit addresses is moot — the injection already executes at source time regardless of shell.

uv venv --prompt 'x$(touch /tmp/PWNED)y' venv
zsh -c 'source venv/bin/activate'
ls /tmp/PWNED 

I have reported this to security at astral.sh but this does not constitute vulnerability within uv’s attacker and threat models, hence I am reporting this as a regular bug.

Platform

Fedora Linux

Version

0.13.6

Python version

any

Activity

  1. added
    bug
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions