CVE-2026-113722
Description
A flaw was found in virtualenv. Due to improper quoting of interpreter paths when generating script wrappers, an attacker who influences the environment destination path can achieve arbitrary code execution. When a user subsequently executes a generated script launcher, embedded shell commands are evaluated with the privileges of that user.
Statement
Red Hat has evaluated this vulnerability as having an Important security impact because arbitrary code can execute within the calling user's context without requiring elevated system privileges. An attacker must successfully manipulate the target directory path used to create the virtual environment, and execution occurs only when a user or automation script runs the generated launcher. Although developer tooling and containerized build pipelines frequently create virtual environments, the issue cannot be triggered remotely without local script invocation.
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 eliminate unquoted shell wrapper invocations by enforcing safe argument quoting or direct process execution for POSIX script launchers: 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 quote interpreter executable paths using shlex.quote with backslash escaping in shell shebangs and rewrite pip-generated launchers during environment seeding, closing all 2 injection vectors (crafted environment destination path with shell command substitutions, long destination directory path exceeding shebang length limits). Until patched, this is only a concern on Linux systems where virtualenv creates POSIX console script launchers in attacker-influenced directory paths — non-POSIX platforms including Windows are unaffected — so restrict and audit who can specify virtual environment destination paths, ensure paths do not contain shell metacharacters or exceed 127 bytes, and regenerate existing launchers. As a compensating measure, log suspicious execve syscalls and command invocations resulting from command substitution evaluation using the Linux audit subsystem, confine the actions and access of commands executed by the compromised launcher process using SELinux in enforcing mode, restrict the privileges and capabilities inherited by commands spawned during launcher execution using SELinux confined user mappings, detect anomalous process trees and shell executions spawned upon script launcher invocation using EDR agents, and detect unexpected shell execution and child process spawning from script launcher paths using Falco eBPF runtime security. These controls limit blast radius and contain exploitation, but they do not fix the underlying improper-quoting command injection defect — apply the upstream patch to fully remediate.
Highest-impact CME: CME-1307 Command Injection Prevention (No Shell Invocation) (high)
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.8 | N/A | 7.8 |
| Attack Vector | Local | N/A | Local |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | Required | N/A | Required |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
cve.org: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Confidentiality,Integrity,Availability,Non-Repudiation
Technical Impact: Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart; Read Files or Directories; Modify Files or Directories; Read Application Data; Modify Application Data; Hide Activities
Attackers could execute unauthorized operating system commands, which could then be used to disable the product, or read and modify data for which the attacker does not have permissions to access directly. Since the targeted application is directly executing the commands instead of the attacker, any malicious activities may appear to come from the application or the application's owner.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.