CVE-2026-113718: virtualenv: Xonsh activation literals depend on the script decoding codec

Published Oct 20, 2026
·
Updated

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, POSIX xonsh activation quote() uses repr() to write printable non-ASCII prompt or destination data into UTF-8 activate.xsh, while xonsh can read that script using $XONSHENCODING. Under a legacy multibyte codec such as GBK or Big5, a UTF-8 trail byte can consume the backslash before an adjacent quote, allowing the literal to close and attacker-influenced statements to execute when the user sources the generated script. This issue is fixed in version 21.14.9.

Affected Software

1 affected component
pypi/virtualenv<21.14.9

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

Event History

Oct 20, 2026
CVE Published
via MITRE·07:39 PM
Data Sourced
via MITRE·07:39 PM
DescriptionWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Users who source a generated POSIX xonsh activation script are exposed when xonsh reads the UTF-8 activate.xsh file using a legacy multibyte encoding such as GBK or Big5. The issue involves non-ASCII prompt or destination data written into that script.

2

What must an attacker control to execute code?

An attacker must be able to influence data that virtualenv writes into the generated xonsh activation script, specifically data that can interact with the encoding mismatch and adjacent quote escaping. Exploitation also requires the user to source that generated script under the affected xonsh encoding conditions.

3

What should teams do to remediate the issue?

Upgrade virtualenv to version 21.14.9 or later, which fixes the issue. If an immediate upgrade is not possible, avoid sourcing generated xonsh activation scripts with legacy multibyte encodings such as GBK or Big5.

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