# PYSEC-2026-4377: virtualenv is a tool for creating isolated virtual python environments

- Database: PyPA
- Also known as: BIT-VIRTUALENV-2026-113718
- Published: 2026-10-20
- Modified: 2026-11-18

## Tracked as

- [CVE-2026-113718](https://cve.now/CVE-2026-113718.md): virtualenv: Xonsh activation literals depend on the script decoding codec

## Also published as

- [GHSA-394H-QWMC-48PF](https://cve.now/GHSA-394H-QWMC-48PF.md) (GitHub)

## Affected versions

- virtualenv (PyPI): from 21.3.0, fixed in 21.14.9

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

## References

- https://github.com/pypa/virtualenv/releases/tag/21.14.9
- https://github.com/pypa/virtualenv/commit/e5fc2e6e189a877ff559af288919e3525d13e5e0
- https://github.com/pypa/virtualenv/pull/3432
- https://github.com/pypa/virtualenv/security/advisories/GHSA-394h-qwmc-48pf

Page: https://cve.now/PYSEC-2026-4377

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
