Vulnerability · Published Oct 20, 2026 · Assigned by GitHub_M
CVE-2026-113718virtualenv: Xonsh activation literals depend on the script decoding codec
High 7.1
In plain English
A high-severity code injection in virtualenv from pypa. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-virtualenv | no fix listed | DEBIAN-CVE-2026-113718 |
| Debian:13 | python-virtualenv | no fix listed | DEBIAN-CVE-2026-113718 |
| Debian:14 | python-virtualenv | no fix listed | DEBIAN-CVE-2026-113718 |
| PyPI | virtualenv | 21.14.9 | GHSA-394h-qwmc-48pf |
| Ubuntu:26.04:LTS | python-virtualenv | no fix listed | UBUNTU-CVE-2026-113718 |
| Ubuntu:26.10 | python-virtualenv | no fix listed | UBUNTU-CVE-2026-113718 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| pypa | virtualenv | < 21.14.9 |
Weakness: CWE-94 · Vector: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
References
- https://github.com/pypa/virtualenv/security/advisories/GHSA-394h-qwmc-48pf x_refsource_CONFIRM
- https://github.com/pypa/virtualenv/pull/3432 x_refsource_MISC
- https://github.com/pypa/virtualenv/commit/e5fc2e6e189a877ff559af288919e3525d13e5e0 x_refsource_MISC
- https://github.com/pypa/virtualenv/releases/tag/21.14.9 x_refsource_MISC