PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-113726 pypa CVE debrief

A vulnerability in the virtualenv package allows for command execution in zsh when activating a virtual environment with a specially crafted name and the PROMPT_SUBST option enabled. This occurs because the script puts the environment name into PS1 without proper escaping when BASH_VERSION is not set. As a result, a zsh user can be affected by running a virtual environment with a name that contains $(...), backticks, or ${...} and the PROMPT_SUBST option is set. The vulnerability can be triggered by creating an environment with a malicious name, such as 'x$(touch PWNED)y', and then activating it in a zsh session with PROMPT_SUBST set, which creates 'PWNED' and shows the prompt '(xy

Vendor
pypa
Product
virtualenv
CVSS
HIGH 7.8
CISA KEV
Not listed in stored evidence
Original CVE published
2026-10-21
Original CVE updated
2026-10-21
Advisory published
2026-10-21
Advisory updated
2026-10-21

Who should care

Defenders responsible for zsh environments with virtualenv and PROMPT_SUBST enabled should assess exposure and prioritize verification and remediation. This includes reviewing the supplied official advisory or CVE record to validate affected scope, severity, and vendor guidance. Defenders should also plan vendor-supported updates or mitigations through normal change control where exposure is confirmed.

Why it matters

CVE-2026-113726 allows for command execution in zsh environments with PROMPT_SUBST enabled, requiring defenders to assess exposure and prioritize remediation.

  • Command execution in zsh environments with PROMPT_SUBST enabled
  • Potential for unauthorized access and data breaches
  • Need for verification and remediation of vulnerable virtualenv versions

Technical summary

The virtualenv package is vulnerable to command execution in zsh when activating a virtual environment with a specially crafted name and the PROMPT_SUBST option enabled. The vulnerability is due to the script putting the environment name into PS1 without proper escaping when BASH_VERSION is not set. This allows for command execution in zsh environments with PROMPT_SUBST enabled, requiring defenders to assess exposure and prioritize remediation. The vulnerability can be triggered by creating an environment with a malicious name, such as 'x$(touch PWNED)y', and then activating it in a zsh session with PROMPT_SUBST set.

Defensive priority

Defenders should prioritize verifying and upgrading to version 21.14.4 or later, and assess exposure in zsh environments with PROMPT_SUBST enabled.

Recommended defensive actions

  • Verify and upgrade virtualenv to version 21.14.4 or later
  • Assess exposure in zsh environments with PROMPT_SUBST enabled
  • Monitor for suspicious activity in virtual environments
  • Review compensating controls for exposed systems while remediation is scheduled and verified
  • Check relevant monitoring, detection, and logs for exposed assets that need extra review
  • Track exceptions, retest remediated assets, and close the item only after evidence is documented
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up

Evidence notes

The vulnerability is triggered when a zsh user activates a virtual environment with a name that contains $(...), backticks, or ${...} and the PROMPT_SUBST option is set. This requires verification of zsh environments and user-controlled environment names. The vulnerability is due to the script putting the environment name into PS1 without proper escaping when BASH_VERSION is not set. The name comes from the environment directory, or from --prompt or VIRTUALENV_PROMPT. The vulnerability can be exploited by creating an environment with

Sources and references

Verified primary and authoritative sources

  • CVE-2026-113726 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-113726

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-113726 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-113726

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.