CVE-2026-113732: virtualenv activate.fish runs commands from a path or prompt with a backslash before a quote

Published Oct 20, 2026
·
Updated

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 VIRTUALENVPROMPT 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.

Affected Software

1 affected component
pypi/virtualenv<21.14.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade virtualenv to a version that resolves this vulnerability.

    Fixed in 21.14.2

Event History

Oct 20, 2026
CVE Published
via MITRE·10:01 PM
Data Sourced
via MITRE·10:01 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Users of virtualenv versions earlier than 21.14.2 who use the fish shell and source a generated activate.fish script are exposed when the environment path, --prompt value, or VIRTUALENV_PROMPT value is attacker-influenced and contains a backslash immediately before a quote.

2

What must an attacker control to exploit it?

The attacker must be able to influence the virtual environment path, the --prompt option, or the VIRTUALENV_PROMPT value used when generating the activation script. Exploitation also requires a user to source the resulting activate.fish script in fish.

3

Are other activation shells affected by the described flaw?

The issue described is specific to FishActivator and the generated activate.fish script. The vulnerable behavior comes from using POSIX shlex.quote() despite fish handling backslashes and single quotes differently.

4

How can I remediate the issue?

Upgrade virtualenv to version 21.14.2 or later. If upgrading is not immediately possible, avoid sourcing activate.fish scripts generated from attacker-influenced environment paths or prompt values, especially values containing a backslash before a quote.

5

How can I determine whether a generated activation script is risky?

Review the inputs used to generate it: the environment path, --prompt value, and VIRTUALENV_PROMPT. A script is at risk when one of those attacker-influenced values contains a backslash immediately before a quote and the script is sourced by fish.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203