Read the docs

Code injection in virtualenv Xonsh activation script

Priority HIGH 66CWE-94Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Active
Attack complexity
High
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 5 without a fix

Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-94.

Summary

virtualenv versions before 21.14.9 are affected. The POSIX Xonsh activation script writes non-ASCII prompt or destination data with repr() into a UTF-8 file that Xonsh may read with a legacy codec such as GBK or Big5, so a UTF-8 trail byte can break out of a quoted literal (CWE-94). A local attacker who influences that data can get statements executed when a user sources the generated script.

Written with Claude Haiku 5.5 from the sources below · 2026-11-07

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00242 15th percentileScored 2026-11-07
Fix Partial virtualenv (pypa): 21.14.9virtualenv (PyPI): 21.14.9Red Hat: 5 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pypavirtualenvbefore 21.14.921.14.9Patch availableCNA
—virtualenv (PyPI)before 21.14.921.14.9Patch availableGHSA-394h-qwmc-48pf
  • virtualenv Vendorpypa Affected before 21.14.9 Fixed in 21.14.9 Patch available CNA
  • virtualenv (PyPI) Vendor— Affected before 21.14.9 Fixed in 21.14.9 Patch available GHSA-394h-qwmc-48pf

Remediation

Upgrade virtualenv to version 21.14.9, which fixes the issue. Red Hat lists OpenShift Lightspeed with no fix planned, and Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenShift Dev Spaces and Red Hat Satellite 6 with no fix available.

Written with Claude Haiku 5.5 from the sources below · 2026-11-07

  • Fix · CNA virtualenv (pypa) Fixed in 21.14.9
  • Fix · GHSA-394h-qwmc-48pf virtualenv (PyPI) Fixed in 21.14.9 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
OpenShift LightspeedAffectedNo fix planned: Will not fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet
Red Hat OpenShift Dev SpacesAffectedNo fix yet
Red Hat Satellite 6AffectedNo fix yet
Not affected: 3 products
  • Red Hat Ansible Automation Platform 2
  • Red Hat OpenShift AI (RHOAI)
  • Red Hat OpenShift Container Platform 4

Timeline

  1. 2026-10-21 Threatist record created from CVE-2026-113718
  2. 2026-10-21 Affected versions changed · Red Hat
  3. 2026-10-21 CVSS score added · Red Hat
  4. 2026-10-22 Priority changed: MEDIUM → LOW
  5. 2026-10-22 Affected versions changed · Red Hat
  6. 2026-10-23 Alias added: GHSA-394h-qwmc-48pf
  7. 2026-10-23 Fix available: PyPI/[email protected] · GHSA-394h-qwmc-48pf
  8. 2026-10-23 CVSS score added · GHSA-394h-qwmc-48pf
  9. 2026-10-23 Weakness changed · GHSA-394h-qwmc-48pf
  10. 2026-10-23 6 new references · GHSA-394h-qwmc-48pf
  11. 2026-10-27 CISA SSVC decision points changed
  12. 2026-10-27 Priority changed: LOW → HIGH
  13. 2026-11-02 Affected versions changed · Red Hat
  14. 2026-11-03 Affected versions changed · Red Hat
  15. 2026-11-07 Affected versions changed · Red Hat

References

  • TI-2025-29803 setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write CVSS 4.0HIGH 7.7
  • TI-2024-05888 Remote Code Execution in pypa/setuptools CVSS 3.0HIGH 8.8
  • TI-2026-78525 Shell command injection in virtualenv generated POSIX launchers CVSS 3.1HIGH 7.8
  • TI-2026-78526 Command injection in virtualenv bash activation prompt CVSS 4.0HIGH 7.1
  • TI-2026-19377 wheel Allows Arbitrary File Permission Modification via Path Traversal CVSS 3.1HIGH 7.1
  • TI-2026-42704 setuptools: MANIFEST.in exclusion bypass in sdist via Unicode normalization collision (NFC/NFD) on macOS APFS/HFS+ CVSS 3.1MEDIUM 6.1
See all 36 →

Sources