Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    BREW-CHARM-TOOLS-CVE-202… (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 08:49 – Updated: 2026-11-19 08:49 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@20.39.1",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "charm-tools",
            "purl": "pkg:brew/charm-tools"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "3.0.8"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@20.39.1",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "20.39.1"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-charm-tools-CVE-2026-113776",
      "modified": "2026-11-19T08:49:57Z",
      "published": "2026-10-22T08:49:42Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-CONDA-LOCK-CVE-2026… (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-29 21:39 – Updated: 2026-11-19 08:45 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.15.6",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "conda-lock",
            "purl": "pkg:brew/conda-lock"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "2.5.7_1"
                },
                {
                  "fixed": "4.1.0"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.15.6",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.15.6"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-conda-lock-CVE-2026-113776",
      "modified": "2026-11-19T08:45:29Z",
      "published": "2026-10-29T21:39:28Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "BIT-virtualenv-2026-113776",
        "CVE-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-HATCH-CVE-2026-113776 (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:30 – Updated: 2026-11-19 10:09 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.15.1",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "hatch",
            "purl": "pkg:brew/hatch"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "1.12.0"
                },
                {
                  "fixed": "1.18.1_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.15.1",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.15.1"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-hatch-CVE-2026-113776",
      "modified": "2026-11-19T10:09:46Z",
      "published": "2026-10-22T09:30:15Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-NOX-CVE-2026-113776 (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 10:41 – Updated: 2026-11-19 10:29 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.14.13",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "nox",
            "purl": "pkg:brew/nox"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "2024.04.15"
                },
                {
                  "fixed": "2026.8.17_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.14.13",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.14.13"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-nox-CVE-2026-113776",
      "modified": "2026-11-19T10:29:00Z",
      "published": "2026-10-22T10:41:11Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-PDM-CVE-2026-113776 (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:28 – Updated: 2026-11-19 09:17 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.15.5",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "pdm",
            "purl": "pkg:brew/pdm"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "2.19.1"
                },
                {
                  "fixed": "2.29.2_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.15.5",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.15.5"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-pdm-CVE-2026-113776",
      "modified": "2026-11-19T09:17:08Z",
      "published": "2026-10-22T09:28:40Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-PIPENV-CVE-2026-113776 (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:47 – Updated: 2026-11-19 09:22 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.15.6",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "pipenv",
            "purl": "pkg:brew/pipenv"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "2024.1.0"
                },
                {
                  "fixed": "2026.8.0_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.15.6",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.15.6"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-pipenv-CVE-2026-113776",
      "modified": "2026-11-19T09:22:30Z",
      "published": "2026-10-22T09:47:00Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-POETRY-CVE-2026-113776 (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-29 22:19 – Updated: 2026-11-19 09:13 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.14.13",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "poetry",
            "purl": "pkg:brew/poetry"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "1.8.3_2"
                },
                {
                  "fixed": "2.5.1_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.14.13",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.14.13"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-poetry-CVE-2026-113776",
      "modified": "2026-11-19T09:13:01Z",
      "published": "2026-10-29T22:19:24Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "BIT-virtualenv-2026-113776",
        "CVE-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-PRE-COMMIT-CVE-2026… (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:38 – Updated: 2026-11-19 10:22 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.14.13",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "pre-commit",
            "purl": "pkg:brew/pre-commit"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "4.0.0"
                },
                {
                  "fixed": "4.6.2_1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.14.13",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.14.13"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-pre-commit-CVE-2026-113776",
      "modified": "2026-11-19T10:22:29Z",
      "published": "2026-10-22T09:38:37Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-TOX-CVE-2026-113776 (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:02 – Updated: 2026-11-19 09:50 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.15.8",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "tox",
            "purl": "pkg:brew/tox"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "4.21.0"
                },
                {
                  "fixed": "4.64.6"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.15.8",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.15.8"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-tox-CVE-2026-113776",
      "modified": "2026-11-19T09:50:00Z",
      "published": "2026-10-22T09:02:57Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-VIRTUALENVWRAPPER-C… (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 11:13 – Updated: 2026-11-19 10:54 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.14.13",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "virtualenvwrapper",
            "purl": "pkg:brew/virtualenvwrapper"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "6.1.0"
                },
                {
                  "fixed": "6.1.1_3"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.14.13",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.14.13"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-virtualenvwrapper-CVE-2026-113776",
      "modified": "2026-11-19T10:54:02Z",
      "published": "2026-10-22T11:13:48Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    BREW-VIRTUALFISH-CVE-202… (GHSA-8RJX-V5WW-45PP)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:00 – Updated: 2026-11-19 09:55 – Source website
    VLAI
    Summary
    virtualenv activation scripts run code from a path that contains a placeholder name
    Details

    Impact

    ViaTemplateActivator.instantiate_template replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.

    __VIRTUAL_NAME__ holds the environment's directory name, so a destination such as A__VIRTUAL_NAME__B/x'$(touch PWNED)'y is enough. In the default activate for bash, the VIRTUAL_ENV line renders as:

    VIRTUAL_ENV='/tmp/t/A'x'"'"'$(touch PWNED)'"'"'y'B/x'"'"'$(touch PWNED)'"'"'y'
    

    Sourcing that script runs touch PWNED. The same payload in a path without the placeholder name runs nothing. activate.fish runs the command the same way, and the reporter also showed Python code execution through activate.xsh and bin/activate_this.py. In activate.csh, a directory named after a prompt display placeholder, such as __VIRTUAL_PROMPT_DISPLAY_TCSH__, breaks the script with Unmatched '''.

    No change to quote() can stop this, because the rewrite happens after quote() ran; it defeats shlex.quote and repr() alike.

    An attacker needs to influence the destination path or --prompt: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.

    The bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.

    Patches

    Fixed in 21.14.2. Activation scripts now keep a placeholder name in the environment's path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74

    Workarounds

    Do not create an environment whose path or --prompt contains a placeholder name such as __VIRTUAL_NAME__, __VIRTUAL_ENV__ or __VIRTUAL_PROMPT__, and inspect the generated activation script before you source one you did not create.

    Credits

    Kevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": "bump",
            "range_state": "fixed",
            "resource": "virtualenv",
            "resource_purl": "pkg:pypi/virtualenv@21.14.13",
            "upstream_fixed_in": "21.14.2"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "virtualfish",
            "purl": "pkg:brew/virtualfish"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "2.5.9_1"
                },
                {
                  "fixed": "2.5.9_4"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "PyPI",
            "key": "pkg:pypi/virtualenv@21.14.13",
            "name": "virtualenv",
            "resource": "virtualenv",
            "strategy": "registry",
            "subject_version": "21.14.13"
          }
        ]
      },
      "details": "### Impact\n\n`ViaTemplateActivator.instantiate_template` replaces the placeholders in an activation template one key at a time, each across the whole text. When a value that it already substituted and quoted contains the name of a later placeholder, the later pass rewrites that name inside the quoted literal. The inserted value brings its own quotes, which close the outer literal, and the rest of the path runs as code when a user activates the environment.\n\n`__VIRTUAL_NAME__` holds the environment\u0027s directory name, so a destination such as `A__VIRTUAL_NAME__B/x\u0027$(touch PWNED)\u0027y` is enough. In the default `activate` for bash, the `VIRTUAL_ENV` line renders as:\n\n```sh\nVIRTUAL_ENV=\u0027/tmp/t/A\u0027x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027B/x\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027y\u0027\n```\n\nSourcing that script runs `touch PWNED`. The same payload in a path without the placeholder name runs nothing. `activate.fish` runs the command the same way, and the reporter also showed Python code execution through `activate.xsh` and `bin/activate_this.py`. In `activate.csh`, a directory named after a prompt display placeholder, such as `__VIRTUAL_PROMPT_DISPLAY_TCSH__`, breaks the script with `Unmatched \u0027\u0027\u0027`.\n\nNo change to `quote()` can stop this, because the rewrite happens after `quote()` ran; it defeats `shlex.quote` and `repr()` alike.\n\nAn attacker needs to influence the destination path or `--prompt`: a CI job or wrapper tool that builds the path from a branch or project name, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects versions 20.26.6 through 21.14.1. Version 20.26.6 first quoted template values (#2768) and introduced the per-key loop.\n\n### Patches\n\nFixed in 21.14.2. Activation scripts now keep a placeholder name in the environment\u0027s path or prompt as plain text, and activating the example above runs nothing. Fix: https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74\n\n### Workarounds\n\nDo not create an environment whose path or `--prompt` contains a placeholder name such as `__VIRTUAL_NAME__`, `__VIRTUAL_ENV__` or `__VIRTUAL_PROMPT__`, and inspect the generated activation script before you source one you did not create.\n\n### Credits\n\nKevin Stubbings (@Kwstubbs) of GitHub Security Lab reported this issue.",
      "id": "BREW-virtualfish-CVE-2026-113776",
      "modified": "2026-11-19T09:55:50Z",
      "published": "2026-10-22T09:00:09Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113776"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/pypa/virtualenv"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "type": "CVSS_V3"
        }
      ],
      "summary": "virtualenv activation scripts run code from a path that contains a placeholder name",
      "upstream": [
        "GHSA-8rjx-v5ww-45pp",
        "CVE-2026-113776",
        "BIT-virtualenv-2026-113776",
        "PYSEC-2026-4387"
      ]
    }

    CVE-2026-113776 (GCVE-0-2026-113776)

    Vulnerability from cvelistv5 – Published: 2026-10-20 22:03 – Updated: 2026-10-28 14:54
    VLAI
    Title
    virtualenv activation scripts run code from a path that contains a placeholder name
    Summary
    virtualenv is a tool for creating isolated virtual python environments. From 20.26.6 until 21.14.2, ViaTemplateActivator.instantiate_template() replaces placeholders one key at a time across the complete activation template, so trigger names such as __VIRTUAL_NAME__, __VIRTUAL_ENV__, or __VIRTUAL_PROMPT__ inside an already substituted and quoted environment path or prompt can be replaced during a later pass. The later value's quoting can close the earlier literal and execute the remaining path when a user activates the environment through bash, fish, xonsh, or activate_this.py. The distinct csh prompt-display token __VIRTUAL_PROMPT_DISPLAY_TCSH__ can instead break the generated script without establishing command execution. The attacker must influence the destination path or --prompt, and a value without a relevant placeholder name does not trigger this mechanism. This issue is fixed in version 21.14.2.
    SSVC
    Exploitation: none Automatable: no Technical Impact: total
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2026-10-28 14:53 UTC
    CWE
    • CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
    • CWE-94 - Improper Control of Generation of Code ('Code Injection')
    Assigner
    GitHub_M CNA
    Impacted products
    Vendor Product Version
    pypa virtualenv Affected: >= 20.26.6, < 21.14.2
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-113776",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-10-28T14:53:53.156314Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-10-28T14:54:19.776Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "virtualenv",
              "vendor": "pypa",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003e= 20.26.6, \u003c 21.14.2"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "virtualenv is a tool for creating isolated virtual python environments. From 20.26.6 until 21.14.2, ViaTemplateActivator.instantiate_template() replaces placeholders one key at a time across the complete activation template, so trigger names such as __VIRTUAL_NAME__, __VIRTUAL_ENV__, or __VIRTUAL_PROMPT__ inside an already substituted and quoted environment path or prompt can be replaced during a later pass. The later value\u0027s quoting can close the earlier literal and execute the remaining path when a user activates the environment through bash, fish, xonsh, or activate_this.py. The distinct csh prompt-display token __VIRTUAL_PROMPT_DISPLAY_TCSH__ can instead break the generated script without establishing command execution. The attacker must influence the destination path or --prompt, and a value without a relevant placeholder name does not trigger this mechanism. This issue is fixed in version 21.14.2."
            }
          ],
          "metrics": [
            {
              "cvssV3_1": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
                "version": "3.1"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-78",
                  "description": "CWE-78: Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            },
            {
              "descriptions": [
                {
                  "cweId": "CWE-94",
                  "description": "CWE-94: Improper Control of Generation of Code (\u0027Code Injection\u0027)",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-10-20T22:03:18.274Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-8rjx-v5ww-45pp"
            },
            {
              "name": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/pypa/virtualenv/commit/602b26623a724827ff171bf11fef4ad186d01f74"
            },
            {
              "name": "https://github.com/pypa/virtualenv/releases/tag/21.14.2",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/pypa/virtualenv/releases/tag/21.14.2"
            }
          ],
          "source": {
            "advisory": "GHSA-8rjx-v5ww-45pp",
            "discovery": "UNKNOWN"
          },
          "title": "virtualenv activation scripts run code from a path that contains a placeholder name"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-113776",
        "datePublished": "2026-10-20T22:03:18.274Z",
        "dateReserved": "2026-10-20T17:39:41.371Z",
        "dateUpdated": "2026-10-28T14:54:19.776Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }