CVE-2026-113718
NoneCVSS
—
EPSS
0.2%
Published
Oct 20, 2026
CISA due date
—
Cloudanix analysis
A bug in a popular Python environment tool could let an attacker run their own commands on a developer's computer when that developer activates a special shell setup containing certain non-English characters.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- High
- Impact
- Remote Code Execution
- Component
- Application
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
In virtualenv versions before 21.14.9, the POSIX xonsh activation script generator uses repr() on non-ASCII prompt or path data when writing UTF-8 activate.xsh. When xonsh later interprets the script under a legacy multibyte codec such as GBK or Big5, a UTF-8 continuation byte can consume the backslash preceding a quote, prematurely terminating the string literal and allowing attacker-controlled statements to be injected into the sourced script.
Why it matters to the business
An attacker who can influence the virtualenv prompt or destination path can achieve arbitrary code execution in the context of any user who later sources the generated activation script, potentially leading to compromise of development or build environments.
How an attack unfolds
An attacker crafts a virtualenv creation command that embeds a malicious non-ASCII sequence in the prompt or destination path. When virtualenv generates activate.xsh it writes the data via repr(), producing a UTF-8 literal. A victim running xonsh with a legacy multibyte encoding enabled sources the script; the encoding misinterprets the byte sequence, closes the string early, and executes the injected commands.
How to fix it
Upgrade virtualenv to version 21.14.9 or later on all systems that generate xonsh activation scripts. After upgrade, regenerate any existing activate.xsh files. If immediate upgrade is impossible, avoid sourcing activation scripts under legacy multibyte encodings or switch to a different shell activation mechanism.
How to confirm the fix worked
Confirm virtualenv --version reports 21.14.9 or newer. Inspect generated activate.xsh files for absence of raw repr() output containing non-ASCII data and verify that sourcing the script under GBK/Big5 does not execute unexpected commands.
Typical attack path
- Attacker supplies a malicious non-ASCII prompt or path to virtualenv create
- virtualenv writes activate.xsh using repr() on the supplied data
- Victim configures xonsh with a legacy multibyte encoding and sources the generated script
- Encoding quirk consumes the backslash, closes the literal, and runs attacker statements
How to detect it
Review shell history and virtualenv creation logs for commands that include non-ASCII characters in prompts or paths. Examine generated activate.xsh files for suspicious repr()-style strings containing high-bit bytes. Check xonsh configuration for legacy multibyte encoding settings.
What your security team should do
- Immediately upgrade all virtualenv installations to 21.14.9 or newer
- Scan build and CI systems for use of xonsh activation scripts and regenerate them after patching
- Add virtualenv version checks to dependency scanning and container base images
- Monitor for any internal use of legacy multibyte encodings with xonsh
The record
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 $XONSH_ENCODING. 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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-63378 TAKO AI Agent for Okta is a local-first AI agent that helps Okta administrators query… CWE-94
- CVE-2026-63346 Refitter is a tool for generating a C# REST API client using the Refit library. CWE-94
- CVE-2026-63345 Refitter is a tool for generating a C# REST API client using the Refit library. CWE-94
- CVE-2026-63344 Refitter is a tool for generating a C# REST API client using the Refit library. CWE-94
- CVE-2026-62853 ThingLinks is an enterprise IoT platform. CWE-94
- CVE-2026-62284 OSAC operator is a Kubernetes operator. CWE-94
- CVE-2026-116852 Author Remote Code Execution (RCE) in Widget Options <= 4.2.5 versions. CWE-94
- CVE-2026-118635 The The GeoDirectory – WP Business Directory Plugin and Classified Listings Directory… CWE-94