cve.bz

CVE-2026-113718 virtualenv virtualenv: Code Injection

7.1 highExploit referenceEPSS 0.2%Fix available

High (7.1) in virtualenv virtualenv. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in virtualenv 21.14.9.

On this page
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.

Severity

CVSS 4.0

7.1 high
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

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago) estimated probability of exploitation activity in the next 30 days; 16th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2026-10-27. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-113718 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-113718?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-113718?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-113718 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
virtualenv:virtualenvfrom 21.3.0 before 21.14.9

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-394h-qwmc-48pfPyPIvirtualenv<21.14.921.14.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14python-virtualenvno fix listedDEBIAN-CVE-2026-113718
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTS and 5 morepython-virtualenvno fix listedUBUNTU-CVE-2026-113718
openSUSETumbleweedpython-virtualenv21.15.1-1.1openSUSE-SU-2026:12372-1
Azure Linux3python-virtualenvno fix listedAZL-112589

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Product Security rates this vulnerability as Moderate because exploitation requires a combination of uncommon preconditions, including the use of an alternative non-default shell (xonsh) and legacy multibyte character encodings such as GBK or Big5. In typical Red Hat deployments, system locales default to UTF-8 and virtual environments are managed using standard shells like bash, which are unaffected by this flaw. Furthermore, an attacker must have sufficient influence over virtual environment creation parameters—such as custom prompts or file system target paths—and convince a local user to source the resulting script, limiting the practical attack surface.

Red Hat's mitigation

--- CME Mitigation Guidance (2026-10-20) ---

Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to ensure virtualenv serializes prompt and path values in xonsh activation scripts as pure ASCII escape sequences rather than raw multibyte characters: upgrade to virtualenv 21.14.9 (or the fixed Uv/Rhoai/Odh Kserve Agent Rhel/Rhoai/Odh Kserve Controller Rhel/Rhoai/Odh Kserve Router Rhel/Rhoai/Odh Kserve Storage Initializer Rhel/Python Virtualenv/Rhoai/Odh Feature Server Rhel/Python3.11 Virtualenv/Python3.12 Virtualenv/Devspaces/Udi Rhel/Rhoai/Odh Ta Lmes Job Rhel/Cloudservices/Advisor Backend/Satellite/Iop Host Inventory Rhel/Satellite/Iop Yuptoo Rhel/Ansible Automation Platform 26/Lightspeed Chatbot Rhel/Satellite/Iop Advisor Backend Rhel/Ansible Automation Platform 26/Controller Rhel/Ansible Automation Platform 27/Controller Rhel/Ansible Ai Connect Service/Insights Host Inventory/Rhoai/Odh Training Rocm64 Torch28 Py312 Rhel/Cloudservices/Ros Backend/Redhat User Workloads/Mintmaker Renovate Image/Koku Daily/Nise Populator/Openshift Lightspeed/Lightspeed Service Api Rhel/Rhoai/Odh Trustyai Nemo Guardrails Server Rhel/Ansible Chatbot Stack/Rhoai/Odh Workbench Codeserver Datascience Cpu Py312 Rhel/Rhoai/Odh Workbench Jupyter Datascience Cpu Py312 Rhel/Rhoai/Odh Workbench Jupyter Pytorch Llmcompressor Cuda Py312 Rhel/Cloudservices/Rbac/Cloudservices/Yuptoo/Rhel Cla/Rlsapi Rhel/Rhai Early Access/Docling Serve Cuda Rhel/Digital Roadmap Backend/Ansible Automation Platform 27/Eda Controller Rhel/Automation Hub Container/Ansible Automation Platform 26/Eda Controller Rhel/Vulnerability Engine builds), which replace repr() with ascii() in XonshActivator.quote to serialize all non-ASCII characters as ASCII escape sequences, closing all 2 injection vectors (crafted prompt arguments, crafted destination directory paths). Until patched, this is a concern on Environments where virtualenv-generated xonsh activation scripts are sourced in shell sessions using legacy multibyte encodings, so Audit and restrict virtualenv prompt arguments and destination directory paths to trusted inputs, and enforce UTF-8 source decoding across xonsh sessions. These controls limit blast radius and contain exploitation, but they do not fix the underlying improper quoting defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-1315 Allowlist-Preferred Input Validation (Deny-by-Default Filtering) (high)

ProductPackageStateAdvisory
Red Hat OpenShift AI 3.5rhoai/odh-kserve-storage-initializer-rhel9:1793691340Fixed 2026-11-06RHSA-2026:95872
Red Hat OpenShift AI 3.5rhoai/odh-ta-lmes-job-rhel9:1793398367Fixed 2026-11-06RHSA-2026:95872
Red Hat OpenShift AI 3.5rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9:1793727032Fixed 2026-11-06RHSA-2026:95872
Red Hat Satellite 6.18satellite/iop-host-inventory-rhel9:1793772638Fixed 2026-11-05RHSA-2026:95674
Red Hat Satellite 6.18satellite/iop-yuptoo-rhel9:1793811191Fixed 2026-11-05RHSA-2026:95682
Red Hat Satellite 6.18satellite/iop-advisor-backend-rhel9:1793757716Fixed 2026-11-05RHSA-2026:95719
Red Hat Satellite 6.19satellite/iop-yuptoo-rhel9:1793811128Fixed 2026-11-05RHSA-2026:95659
Red Hat Satellite 6.19satellite/iop-host-inventory-rhel9:1793853308Fixed 2026-11-05RHSA-2026:95662
Red Hat Satellite 6.19satellite/iop-advisor-backend-rhel9:1793758586Fixed 2026-11-05RHSA-2026:95703
OpenShift Lightspeedopenshift-lightspeed/lightspeed-service-api-rhel9Will not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/controller-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/eda-controller-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/lightspeed-chatbot-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/controller-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/eda-controller-rhel9Not affected
Red Hat Ansible Automation Platform 2python3.11-virtualenvAffected
Red Hat Ansible Automation Platform 2python3.12-virtualenvAffected
Red Hat Ansible Automation Platform 2python-virtualenvAffected
Red Hat OpenShift AI (RHOAI)rhai-early-access/docling-serve-cuda-rhel9Affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-feature-server-rhel9Affected
9 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-113718.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

History

  1. Analyzed by the NVD

Changes since this site first stored the record. The same for every record: /api/public/changes.

References

Check your stackJSON