PatchSiren cyber security CVE debrief
CVE-2026-113732 pypa CVE debrief
CVE-2026-113732 is a vulnerability in the virtualenv package, specifically in the `activate.fish` script. The vulnerability occurs when a backslash is used before a quote in a path or prompt, allowing an attacker to execute arbitrary commands. The vulnerability is triggered when the `activate.fish` script is sourced, and it can be exploited by creating a directory with a specially crafted name. The vulnerability has been fixed in version 21.14.2 of the virtualenv package.
- Vendor
- pypa
- Product
- virtualenv
- CVSS
- HIGH 7.8
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-10-21
- Original CVE updated
- 2026-10-21
- Advisory published
- 2026-10-21
- Advisory updated
- 2026-10-21
Who should care
Defenders who use the virtualenv package in their environments should be aware of this vulnerability and take steps to mitigate it. This includes upgrading to version 21.14.2 of the virtualenv package and being cautious when using the `activate.fish` script in environments where the path or prompt may be controlled by an attacker.
Why it matters
CVE-2026-113732 is a vulnerability in the virtualenv package that allows arbitrary command execution. Defenders should prioritize upgrading to version 21.14.2 and be cautious when using the `activate.fish` script in environments where the path or prompt may be controlled by an attacker.
- An attacker could execute arbitrary commands in environments where the virtualenv package is used.
- The vulnerability can be exploited by creating a directory with a specially crafted name.
- Defenders should verify that their environments are not vulnerable to this attack.
- Remediation priority is high for environments where the virtualenv package is used.
Technical summary
The vulnerability occurs in the `activate.fish` script generated by the virtualenv package. When a backslash is used before a quote in a path or prompt, it allows an attacker to execute arbitrary commands. This is caused by the `FishActivator` class inheriting the `quote` method from `ViaTemplateActivator`, which uses `shlex.quote` to quote strings. However, `shlex.quote` follows POSIX `sh` rules, which differ from the rules used by the fish shell.
Defensive priority
Defenders should prioritize upgrading to version 21.14.2 of the virtualenv package to prevent exploitation of this vulnerability. Additionally, defenders should be cautious when using the `activate.fish` script in environments where the path or prompt may be controlled by an attacker.
Recommended defensive actions
- Upgrade to version 21.14.2 of the virtualenv package
- Use caution when using the `activate.fish` script in environments where the path or prompt may be controlled by an attacker
- Monitor for suspicious activity in environments where the virtualenv package is used
- Review compensating controls for exposed systems while remediation is scheduled and verified
- Check relevant monitoring, detection, and logs for exposed assets that need extra review
- Track exceptions, retest remediated assets, and close the item only after evidence is documented
- Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
Evidence notes
The vulnerability is caused by the `FishActivator` class inheriting the `quote` method from `ViaTemplateActivator`, which uses `shlex.quote` to quote strings. However, `shlex.quote` follows POSIX `sh` rules, which differ from the rules used by the fish shell. This discrepancy allows an attacker to inject arbitrary commands.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-113732 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-113732
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-113732 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-113732
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote
Unverified legacy reference
URL: https://storage.googleapis.com/osv-vulnerabilities/PyPI/GHSA-c947-3pg5-gm8q.json
osv_dev
-
Source reference
Unverified legacy reference
URL: https://github.com/pypa/virtualenv/security/advisories/GHSA-c947-3pg5-gm8q
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/pypa/virtualenv/commit/3bddeaf8d02c3ee7f576503efb082f8f494cfcab
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/pypa/virtualenv
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/pypa/virtualenv/releases/tag/21.14.2
Supplemental source
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.