Loading0%
SUBZER0
LIVE
Alerts

CVE-2026-113718

virtualenv: Xonsh activation literals depend on the script decoding codec

Archived. This CVE has left SubZer0's live 30-day window. Signals below are as of 2026-11-22; check the references for anything newer.

  • Severity: High
  • CVSS 7.1
  • EPSS 0.24%
  • Public exploit
  • P2 · This week

Why P2: this week.

Description

## Summary Caller-supplied prompt text can become executable syntax in the xonsh activation script. An attacker must influence the value passed to virtualenv, and a user must subsequently activate the environment. ## Affected area Xonsh reads a UTF-8 activation script using a legacy multibyte encoding such as GBK. Printable non-ASCII bytes can change how the reader recognizes an adjacent quote. The report concerns POSIX activation. It does not establish exposure through unrelated activators. ## Attacker-controlled input The attacker controls prompt or destination data passed as a virtualenv argument. The user later sources the generated activation script. ## Affected code The relevant 21.14.8 source is in [xonsh quote()](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/activation/xonsh/__init__.py), [UTF-8 template writer](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/activation/via_template.py). ## Mechanism The generator writes `activate.xsh` as UTF-8. Its `quote()` used `repr()`, which leaves printable non-ASCII characters in the file and backslash-escapes an embedded quote. Xonsh's `source` reads the file using `$XONSH_ENCODING`. With GBK or Big5, the UTF-8 bytes of `中` end in `0xad`, which pairs with the following `0x5c` backslash as one decoded character. The backslash no longer escapes the quote. A prompt containing both quote kinds can then close its Python strin…

Affected products

  • pip virtualenv < 21.14.9; first patched: 21.14.9

References

Browse more

PyPI (pip) packagesWeek 43, 2026 recap

Published 2026-10-20 · sources: GitHub Advisory Database