Skip to main content
VulnerabilityPublished

CVE-2026-113718: virtualenv · Xonsh activation literals depend on the script decoding codec

Affects pre-commitSource GCVE Database

0
Authoritative record:CVE-2026-113718· High 7.1

Not known to be exploited · CVSS 7.1 High : upgrade to 4.7.0_1 soon.

Data as of 27 Oct 2026, 06:43 UTC

CVSS 4.0 base score
7.1High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 4.7.0_1
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Oct 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade pre-commit to 4.7.0_1.

Affected software

ProductAffectedFixed in
Homebrewpre-commitpkg:brew/pre-commitOther threatsAffected
  • >=4.6.1 <4.7.0_1
Fixed in
  • 4.7.0_1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in virtualenv version 4.7.0_1 that changes the quoting method to use ascii() instead of repr(), preventing non-ASCII characters from breaking string literals under legacy encodings. Users should upgrade to version 4.7.0_1 or later and regenerate any existing activate.xsh files to ensure they are not vulnerable. No additional mitigation is required if the environment uses UTF-8 encoding for xonsh source decoding.

Description

A vulnerability in virtualenv's xonsh activation script allows attacker-controlled prompt text to become executable code during environment activation if the script is decoded using legacy multibyte encodings like GBK or Big5. This occurs because the UTF-8 activation script contains non-ASCII characters that, when decoded under these encodings, alter how quotes are interpreted, enabling code injection. The attack requires control of the prompt or destination argument passed to virtualenv and subsequent sourcing of the generated activation script. The issue affects POSIX activation scripts and is fixed by changing the quoting method to emit only ASCII escapes.

References

Community reviews

Loading reviews…