Vulnerabilities

Security fix · CVE-2026-113718

virtualenv is a tool for creating isolated virtual python environments.

Published Oct 20, 2026 · catalog updated Oct 23, 2026 · virtualenv is a tool

Last checked Nov 6, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-113718. EPSS is 0.24%. Act only if a listed version of virtualenv is a tool is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (virtualenv is a tool).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
High7.1
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.24%
Remediation
Version ranges on file
Affected products
PyPI virtualenv · package pip · pip virtualenv · pypi virtualenv

## 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 as UTF-8. Its used , which leaves printable non-ASCII characters in the file and backslash-escapes an embedded quote. Xonsh's reads the file using . With GBK or Big5, the UTF-8 bytes of end in , which pairs with the following backslash as one decoded character. The backslash no longer escapes the quote. A prompt containing both quote kinds can then close its Python string literal and supply statements that run during activation. With UTF-8 source decoding, the same value stays inside the literal. ## Reproduction and evidence The original scanner finding, , demonstrated this byte-level failure in : a hostile prompt loaded through under GBK created a marker, while UTF-8 and controls did not. The xonsh path in this advisory was identified in the subsequent maintainer-provided review. [PR #3432](https://github.com/pypa/virtualenv/pull/3432) shows the xonsh source-decoding chain and changes to , which writes non-ASCII characters as escapes. Its regre

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI virtualenv0 → 21.14.9
  • package pipversion unspecified
  • pip virtualenv< 21.14.9
  • pypi virtualenv<21.14.9

How to fix CVE-2026-113718

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-113718. EPSS is 0.24%. Act only if a listed version of virtualenv is a tool is installed.

Which versions are affected?

Compare what you have installed with 0 → 21.14.9, < 21.14.9, <21.14.9. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-94: Code Injection. EPSS 0.24%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 20, 2026 · NIST NVD

    Detected

    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, allowin

  2. Oct 22, 2026 · NIST NVD

    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 $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, allowin

  3. Oct 23, 2026 · GitHub Advisory Database

    Updated

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

  4. Oct 23, 2026 · PyPA Advisory Database

    Fix available

    virtualenv fixed in 21.14.9

  5. Oct 23, 2026 · PyPA Advisory Database

    Fix available

    virtualenv fixed in 21.14.9

  6. Oct 23, 2026 · PyPA Advisory Database

    Updated

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

Sources

  • CVE.orgVulnerability recordCVE-2026-113718

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-113718

    30-day exploitation probability 0.24%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-394h-qwmc-48pf

    virtualenv: Xonsh activation literals depend on the script decoding codec

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-113718

    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.

    advisories.gitlab.com
  • GitLab Advisory DatabasePackage advisorypypi/virtualenv/CVE-2026-113718.yml

    Caller-supplied prompt text can become executable syntax in the xonsh + activation script. An attacker must influence the\nvalue passed to virtualenv, and + a user must subsequently activate the environment." +date: "2026-10-23" +pubdate: "2026-10-23" +affected_range: "<21.14.9" +fixed_versions: +- "21.14.9" +affected_versions: "All versions before 21.14.9" +not_impacted: "All versions starting fr

    gitlab.com
  • NIST NVDVulnerability recordCVE-2026-113718

    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 le

    nvd.nist.gov
  • PyPA Advisory DatabasePackage advisoryGHSA-394h-qwmc-48pf

    virtualenv: Xonsh activation literals depend on the script decoding codec

    osv.dev
  • Snyk Vulnerability DatabasePackage advisorySNYK-PYTHON-VIRTUALENV-21282493

    Arbitrary Code Injection

    security.snyk.io

References

Freshness

Last verified in this catalog Nov 6, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSNov 6, 2026
  • GitLab Advisory DatabaseOct 27, 2026
  • PyPA Advisory DatabaseOct 25, 2026
  • GitLab Advisory DatabaseOct 25, 2026
  • GitHub Advisory DatabaseOct 24, 2026
  • Snyk Vulnerability DatabaseOct 23, 2026
  • CVE.orgOct 23, 2026
  • NIST NVDOct 22, 2026