CVE-2026-113725
Description
A flaw was found in virtualenv. The bash activation script improperly escapes the virtual environment name when configuring the command prompt. If a user activates a virtual environment created with a specially crafted name, an attacker can achieve arbitrary code execution in the user's shell session each time the prompt is displayed.
Statement
Red Hat rates this vulnerability as Important because an attacker can execute arbitrary commands with the privileges of a user who activates a compromised or maliciously named Python virtual environment. While exploitation requires user interaction to source the activation script, developer workstations and automated build environments frequently clone repositories or ingest external directory names, elevating the practical risk of executing untrusted activation scripts. Systems where virtual environments are generated exclusively from trusted names or run non-interactively without prompt evaluation are not affected.
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 sanitize virtual environment names and eliminate unescaped shell variable interpolation in bash prompt configuration scripts: upgrade to virtualenv 21.14.7 (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 escape backslashes, dollar signs, and backticks a second time in activate.sh under bash to prevent expansion across both prompt evaluation passes, closing all 3 injection vectors (crafted environment name, crafted directory name, crafted prompt parameter). Until patched, this is only a concern on non-root bash shell sessions with promptvars enabled sourcing untrusted virtual environment activation scripts — root bash sessions and zsh shell environments are unaffected — so avoid sourcing untrusted activate scripts, set VIRTUAL_ENV_DISABLE_PROMPT=1 in the environment, disable promptvars via shopt -u promptvars, and restrict untrusted directory or environment names. As a compensating measure, deploy EDR agents to detect anomalous child processes spawned from interactive bash shell sessions during prompt evaluation, configure auditd to log execve syscalls initiated when bash evaluates prompt command substitutions, and use Falco or eBPF runtime monitoring to detect unexpected commands and child processes spawned during prompt substitution. These controls limit blast radius and contain exploitation, but they do not fix the underlying incomplete prompt escaping 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.