Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: Official CVE List

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.13.0, the bash activate script that zsh also sources leaves the environment name unescaped; from 21.13.0 until 21.14.4, it escapes backslashes, dollar signs, and backticks only when BASH_VERSION is set, so zsh receives the raw value. The script assigns that value to PS1. In zsh with PROMPT_SUBST, an attacker-influenced environment directory, --prompt, or VIRTUALENV_PROMPT value containing command, parameter, or arithmetic expansion syntax can therefore execute commands in the user's shell each time the prompt is drawn. A percent sign is separately interpreted as a zsh prompt escape but does not by itself execute commands. Plain zsh with PROMPT_SUBST disabled and bash are not affected by this mechanism. This issue is fixed in version 21.14.4.

Products
virtualenv
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-113726
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 16:31 UTC · Revision 2

Source evidence

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

core-cve · Original source

Published 20 Oct 2026, 22:05 UTC

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.13.0, the bash activate script that zsh also sources leaves the environment name unescaped; from 21.13.0 until 21.14.4, it escapes backslashes, dollar signs, and backticks only when BASH_VERSION is set, so zsh receives the raw value. The script assigns that value to PS1. In zsh with PROMPT_SUBST, an attacker-influenced environment directory, --prompt, or VIRTUALENV_PROMPT value containing command, parameter, or arithmetic expansion syntax can therefore execute commands in the user's shell each time the prompt is drawn. A percent sign is separately interpreted as a zsh prompt escape but does not by itself execute commands. Plain zsh with PROMPT_SUBST disabled and bash are not affected by this mechanism. This issue is fixed in version 21.14.4.

cve:CVE-2026-113726

virtualenv

Fixed versions: Not specified

Complete source record
{
  "id": "04faf229af8d068de907edc2d7de5d51c58c88e5a6b5700b3587ab0676caa8c8",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-113726",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "virtualenv activate runs commands from the environment name in zsh with PROMPT_SUBST",
    "summary": "virtualenv is a tool for creating isolated virtual python environments. Prior to 21.13.0, the bash activate script that zsh also sources leaves the environment name unescaped; from 21.13.0 until 21.14.4, it escapes backslashes, dollar signs, and backticks only when BASH_VERSION is set, so zsh receives the raw value. The script assigns that value to PS1. In zsh with PROMPT_SUBST, an attacker-influenced environment directory, --prompt, or VIRTUALENV_PROMPT value containing command, parameter, or arithmetic expansion syntax can therefore execute commands in the user's shell each time the prompt is drawn. A percent sign is separately interpreted as a zsh prompt escape but does not by itself execute commands. Plain zsh with PROMPT_SUBST disabled and bash are not affected by this mechanism. This issue is fixed in version 21.14.4.",
    "evidence": "cve:CVE-2026-113726",
    "products": [
      {
        "name": {
          "value": "virtualenv",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-113726",
      "aliases": [
        "CVE-2026-113726"
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "scope": "UNCHANGED",
            "version": "3.1",
            "baseScore": 7.8,
            "attackVector": "LOCAL",
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
            "integrityImpact": "HIGH",
            "userInteraction": "REQUIRED",
            "attackComplexity": "LOW",
            "availabilityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "HIGH"
          }
        }
      ],
      "affected": [
        {
          "vendor": "pypa",
          "product": "virtualenv",
          "versions": [
            {
              "status": "affected",
              "version": "< 21.14.4"
            }
          ]
        }
      ],
      "modified": "2026-10-27T21:31:29.377Z",
      "provider": "cve",
      "references": [
        "https://github.com/pypa/virtualenv/security/advisories/GHSA-5vjq-rrrf-7h2q",
        "https://github.com/pypa/virtualenv/commit/5b915367da82bd024b2a0d28d2f98007034b4aa2",
        "https://github.com/pypa/virtualenv/releases/tag/21.14.4"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2026-113726",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2026-10-27T21:31:18.828865Z"
                  }
                }
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2026-10-27T21:31:29.377Z"
            }
          }
        ],
        "cna": {
          "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
          "shortName": "GitHub_M",
          "dateUpdated": "2026-10-20T22:05:24.253Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-113726",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 400592,
  "published_at": "2026-10-20T22:05:24.253+00:00"
}