Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    BREW-CHARM-TOOLS-CVE-202… (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 08:49 – Updated: 2026-11-19 08:49 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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": "1.9.3"
                }
              ],
              "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T08:49:57Z",
      "published": "2026-10-22T08:49:42Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-CONDA-LOCK-CVE-2026… (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-29 21:39 – Updated: 2026-11-19 08:45 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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.5"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T08:45:29Z",
      "published": "2026-10-29T21:39:28Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "BIT-virtualenv-2026-113732",
        "CVE-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-HATCH-CVE-2026-113732 (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:30 – Updated: 2026-11-19 10:09 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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.2.0"
                },
                {
                  "fixed": "1.6.2"
                },
                {
                  "introduced": "1.9.3"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T10:09:46Z",
      "published": "2026-10-22T09:30:15Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-NOX-CVE-2026-113732 (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 10:41 – Updated: 2026-11-19 10:29 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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": "2020.12.31"
                },
                {
                  "fixed": "2022.8.7_1"
                },
                {
                  "introduced": "2023.4.22_1"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T10:29:00Z",
      "published": "2026-10-22T10:41:11Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-PDM-CVE-2026-113732 (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:28 – Updated: 2026-11-19 09:17 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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.0.0"
                },
                {
                  "fixed": "2.9.3_2"
                },
                {
                  "introduced": "2.12.3"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T09:17:08Z",
      "published": "2026-10-22T09:28:40Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-PIPENV-CVE-2026-113732 (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:47 – Updated: 2026-11-19 09:22 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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": "8.3.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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T09:22:30Z",
      "published": "2026-10-22T09:47:00Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-POETRY-CVE-2026-113732 (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-29 22:19 – Updated: 2026-11-19 09:13 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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.1.0"
                },
                {
                  "fixed": "1.2.2_1"
                },
                {
                  "introduced": "1.8.0"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T09:13:01Z",
      "published": "2026-10-29T22:19:24Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "BIT-virtualenv-2026-113732",
        "CVE-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-PRE-COMMIT-CVE-2026… (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:38 – Updated: 2026-11-19 10:22 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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": "0.5.0"
                },
                {
                  "fixed": "2.20.0_1"
                },
                {
                  "introduced": "3.6.1"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T10:22:29Z",
      "published": "2026-10-22T09:38:37Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-TOX-CVE-2026-113732 (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:02 – Updated: 2026-11-19 09:50 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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": "3.0.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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T09:50:00Z",
      "published": "2026-10-22T09:02:57Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-VIRTUALENVWRAPPER-C… (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 11:13 – Updated: 2026-11-19 10:54 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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": "4.8.4"
                },
                {
                  "fixed": "4.8.4_2"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T10:54:02Z",
      "published": "2026-10-22T11:13:48Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    BREW-VIRTUALFISH-CVE-202… (GHSA-C947-3PG5-GM8Q)

    Vulnerability from osv_homebrew – Published: 2026-10-22 09:00 – Updated: 2026-11-19 09:55 – Source website
    VLAI
    Summary
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Details

    Impact

    FishActivator defines no quote(), so it inherits ViaTemplateActivator.quote, which returns shlex.quote(string). That function follows POSIX sh rules, where a backslash inside single quotes stays a literal character. fish reads \' inside single quotes as an escaped quote and \\ as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where shlex.quote put the end, and fish expands the command substitution that follows.

    The environment path reaches set -gx VIRTUAL_ENV, and --prompt or VIRTUALENV_PROMPT reaches set -gx VIRTUAL_ENV_PROMPT. For --prompt "x\'\$(touch PWNED)'\'", the generated activate.fish contains:

    set -gx VIRTUAL_ENV_PROMPT 'x\'"'"'$(touch PWNED)'"'"'\'"'"''
    

    source bin/activate.fish runs touch PWNED, and fish prints no error. The same payload as a directory name runs through VIRTUAL_ENV. --prompt . takes the current directory's name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.

    virtualenv generates activate.fish by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.

    The bug affects every release up to 21.14.1 that ships activate.fish. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept shlex.quote.

    Patches

    Fixed in 21.14.2. activate.fish now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab

    Workarounds

    Do not create an environment whose path or prompt contains a backslash, and inspect activate.fish 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.5"
                },
                {
                  "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`FishActivator` defines no `quote()`, so it inherits `ViaTemplateActivator.quote`, which returns `shlex.quote(string)`. That function follows POSIX `sh` rules, where a backslash inside single quotes stays a literal character. fish reads `\\\u0027` inside single quotes as an escaped quote and `\\\\` as an escaped backslash. A value with a backslash before a quote therefore ends the literal somewhere other than where `shlex.quote` put the end, and fish expands the command substitution that follows.\n\nThe environment path reaches `set -gx VIRTUAL_ENV`, and `--prompt` or `VIRTUALENV_PROMPT` reaches `set -gx VIRTUAL_ENV_PROMPT`. For `--prompt \"x\\\u0027\\$(touch PWNED)\u0027\\\u0027\"`, the generated `activate.fish` contains:\n\n```fish\nset -gx VIRTUAL_ENV_PROMPT \u0027x\\\u0027\"\u0027\"\u0027$(touch PWNED)\u0027\"\u0027\"\u0027\\\u0027\"\u0027\"\u0027\u0027\n```\n\n`source bin/activate.fish` runs `touch PWNED`, and fish prints no error. The same payload as a directory name runs through `VIRTUAL_ENV`. `--prompt .` takes the current directory\u0027s name, so running virtualenv inside a directory someone else named is enough. Without the backslash the payload runs nothing, and under bash it runs nothing either.\n\nvirtualenv generates `activate.fish` by default. An attacker needs to influence the environment path or prompt: a CI job or wrapper tool that passes a branch, project or job name through, or a directory in a cloned repository or unpacked archive.\n\nThe bug affects every release up to 21.14.1 that ships `activate.fish`. The GHSA-p58f-9548-mpm2 fix in 21.7.13 moved the placeholders outside their quotes but kept `shlex.quote`.\n\n### Patches\n\nFixed in 21.14.2. `activate.fish` now escapes backslashes and single quotes the way fish reads them, so the example above runs nothing and shows the prompt as given. Fix: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab\n\n### Workarounds\n\nDo not create an environment whose path or prompt contains a backslash, and inspect `activate.fish` 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-113732",
      "modified": "2026-11-19T09:55:50Z",
      "published": "2026-10-22T09:00:09Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
        },
        {
          "type": "ADVISORY",
          "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-113732"
        },
        {
          "type": "WEB",
          "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
        },
        {
          "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 activate.fish runs commands from a path or prompt with a backslash before a quote",
      "upstream": [
        "GHSA-c947-3pg5-gm8q",
        "CVE-2026-113732",
        "BIT-virtualenv-2026-113732",
        "PYSEC-2026-4386"
      ]
    }

    CVE-2026-113732 (GCVE-0-2026-113732)

    Vulnerability from cvelistv5 – Published: 2026-10-20 22:01 – Updated: 2026-10-27 13:26
    VLAI
    Title
    virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
    Summary
    virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.2, FishActivator inherits ViaTemplateActivator.quote(), which uses POSIX shlex.quote() even though fish interprets backslashes and single quotes differently. An attacker-influenced environment path, --prompt, or VIRTUALENV_PROMPT value containing a backslash before a quote can therefore terminate the generated fish literal and execute command substitution when the user sources activate.fish. 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-27 13:26 UTC
    CWE
    • CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
    • CWE-116 - Improper Encoding or Escaping of Output
    Assigner
    GitHub_M CNA
    Impacted products
    Vendor Product Version
    pypa virtualenv Affected: < 21.14.2
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-113732",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-10-27T13:26:40.567506Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-10-27T13:26:51.760Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "virtualenv",
              "vendor": "pypa",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c 21.14.2"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.2, FishActivator inherits ViaTemplateActivator.quote(), which uses POSIX shlex.quote() even though fish interprets backslashes and single quotes differently. An attacker-influenced environment path, --prompt, or VIRTUALENV_PROMPT value containing a backslash before a quote can therefore terminate the generated fish literal and execute command substitution when the user sources activate.fish. 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-116",
                  "description": "CWE-116: Improper Encoding or Escaping of Output",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-10-20T22:01:23.931Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q"
            },
            {
              "name": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab"
            },
            {
              "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-c947-3pg5-gm8q",
            "discovery": "UNKNOWN"
          },
          "title": "virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-113732",
        "datePublished": "2026-10-20T22:01:23.931Z",
        "dateReserved": "2026-10-20T16:03:14.864Z",
        "dateUpdated": "2026-10-27T13:26:51.760Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }