cve.bz

CVE-2026-115586 pypa virtualenv: OS Command Injection

7.1 highEPSS 0.3%Fix available

High (7.1) in pypa virtualenv. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in virtualenv 21.14.13.

On this page
virtualenv is a tool for creating isolated virtual python environments. From 21.14.9 until 21.14.13, the bash bin/activate script can copy an attacker-controlled --prompt value into PS1 without escaping dollar signs or backticks when both promptvars and POSIX mode are disabled during activation. Re-enabling promptvars, running set -o posix, or starting an interactive child bash that inherits the exported PS1 can then expand command substitution in the stored VIRTUAL_ENV_PROMPT value and execute commands as the user who activates the environment. This issue is fixed in version 21.14.13.

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
EPSS
0.3% (unchanged from 0.3% a week ago) estimated probability of exploitation activity in the next 30 days; 20th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-23. 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-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Under analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-115586 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-115586?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-115586?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-115586 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 CNA's record in the CVE List.

ProductAffected
pypa virtualenv>= 21.14.9, < 21.14.13

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-cx6f-vjhg-g3ccPyPIvirtualenv>=21.14.9 <21.14.1321.14.13

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTS and 5 morepython-virtualenvno fix listedUBUNTU-CVE-2026-115586
openSUSETumbleweedpython-virtualenv21.15.1-1.1openSUSE-SU-2026:12372-1

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

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is evaluated as having a Moderate impact for Red Hat products because successful exploitation requires user interaction to activate an environment configured with untrusted prompt metadata, alongside non-default shell settings. On standard Red Hat Enterprise Linux installations, shell option promptvars is enabled by default, avoiding the flawed unescaped prompt code path. Furthermore, arbitrary command execution is strictly limited to the permissions of the local user sourcing the activation script and does not grant elevated privileges.

Red Hat's mitigation

--- CME Mitigation Guidance (2026-11-02) ---

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 unescaped prompt interpolation in generated bash activation scripts to prevent command substitution during shell prompt expansion: upgrade to virtualenv 21.14.13 (or the fixed Rhoai/Odh Kserve Agent Rhel/Rhoai/Odh Kserve Controller Rhel/Rhoai/Odh Kserve Router Rhel/Rhoai/Odh Kserve Storage Initializer Rhel/Python Virtualenv/Python3.11 Virtualenv/Python3.12 Virtualenv/Devspaces/Udi Rhel/Cloudservices/Advisor Backend/Satellite/Iop Host Inventory Rhel/Satellite/Iop Yuptoo Rhel/Satellite/Iop Advisor Backend Rhel/Ansible Automation Platform 26/Controller Rhel/Ansible Automation Platform 27/Controller Rhel/Ansible Ai Connect Service/Ansible Automation Platform 26/Lightspeed Chatbot Rhel/Koku Daily/Nise Populator/Cloudservices/Ros Backend/Ansible Chatbot Stack/Digital Roadmap Backend/Redhat User Workloads/Mintmaker Renovate Image/Ansible Automation Platform 27/Eda Controller Rhel/Insights Host Inventory/Vulnerability Engine/Openshift Lightspeed/Lightspeed Service Api Rhel/Rhoai/Odh Feature Server Rhel/Rhoai/Odh Trustyai Nemo Guardrails Server Rhel/Ansible Automation Platform 26/Eda Controller Rhel/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/Rhoai/Odh Ta Lmes Job Rhel/Rhoai/Odh Training Rocm64 Torch28 Py312 Rhel/Automation Hub Container/Uv builds), which escape prompt characters for all prompt states and bash versions, switch zsh to supply prompts via psvar, and enforce exclusive file creation flags on redirect and RECORD files, closing all 3 injection vectors (crafted --prompt option, crafted virtual environment directory name, untrusted project metadata). Until patched, this is only a concern on Linux environments where users source bash activation scripts created with untrusted prompt or directory metadata — Standard setups maintaining default promptvars without toggling POSIX mode or launching child bash shells are unaffected — so avoid creating environments from untrusted directories or metadata, ensure promptvars remains enabled during activation, or set VIRTUAL_ENV_DISABLE_PROMPT=1. As a compensating measure, configure auditd to detect unauthorized process and syscall execution spawned through delayed prompt expansion, maintain SELinux in enforcing mode to confine the executing shell process and bound arbitrary command actions, and map interactive users to confined SELinux domains to restrict commands and privileges available to injected payloads. These controls limit blast radius and contain exploitation, but they do not fix the underlying unescaped prompt command substitution defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-1307 Command Injection Prevention (No Shell Invocation) (high)

ProductPackageStateAdvisory
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
Red Hat OpenShift AI (RHOAI)rhoai/odh-kserve-agent-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-kserve-controller-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-kserve-router-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-kserve-storage-initializer-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-ta-lmes-job-rhel9Affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-training-rocm64-torch28-py312-rhel9Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-trustyai-nemo-guardrails-server-rhel9Affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9Affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9Affected
6 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-115586.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

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

References

Check your stackJSON