Skip to content

Activating a venv can execute shell commands from a directory name #160280

Open

Description

@jelle-openai

Bug report

An attacker can name a directory in an archive so that activating a freshly created virtual environment inside it runs a command as the developer or build account. A similar issue was fixed a few years ago (d48cc82) and virtualenv just had the equivalent bug fixed (GHSA-8rjx-v5ww-45pp).

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    topic-venvRelated to the venv module
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 22, 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

    stdlibStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduletype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions