CVE-2026-102938 json
virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection
published last mo. modified last mo. also BIT-virtualenv-2026-102938 , EUVD-2026-89465 , GHSA-9h9j-4vrj-gf7g , PYSEC-2026-4012
- cvss
- 5.8
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 3%
- public exploits
- 0
- none known
Summary
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.7.11, PyEnvCfg.write() writes prompt values verbatim to the line-oriented pyvenv.cfg format while PyEnvCfg._read_values() parses the file with str.splitlines() and accepts the last value for duplicate keys. An attacker who influences --prompt, VIRTUALENV_PROMPT, or configuration input can insert a recognized line boundary and additional keys, including home, causing consumers to use an attacker-selected base interpreter or corrupted environment metadata. The security impact requires prompt input from outside the operator's trust boundary; directly supplied prompt content primarily corrupts the operator's own environment. This issue is fixed in version 21.7.11.
Patch / fix
- pypi virtualenv 21.7.11
- bitnami virtualenv 21.7.11
- virtualenv virtualenv 21.7.11
- python-virtualenv SLES for SAP applications 16.0, SLES 16.0 20.29.3-160000.4.1
- python-virtualenv SLES for SAP 15 SP6, SLES for SAP 15 SP5, SLES for SAP 15 SP4 +8 more 20.22.0-150400.9.12.1
suse advisories SUSE-SU-2026:24243-1SUSE-SU-2026:4652-1
- python-virtualenv openSUSE Leap 16.0 20.29.3-160000.4.1
- python-virtualenv openSUSE Tumbleweed 21.14.2-1.1
opensuse advisories openSUSE-SU-2026:22100-1openSUSE-SU-2026:11974-1
- python-virtualenv Azure Linux 3.0 20.36.1-10
azure linux advisories AZL-105672
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- github.com/pypa/virtualenv@a30f995 commit
- github.com/pypa/virtualenv#3247 pull request
- github.com/pypa/virtualenv/releases/tag/21.7.11 release
Is CVE-2026-102938 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-102938 updated cvss 7.0
virtualenv: virtualenv: Arbitrary code execution via configuration injection in prompt values
-
Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9affected: workaround, no fix available
-
Red Hat Ansible Automation Platform 2 python-virtualenv 20.25.1-2.el10ap, python3.11-virtualenv 20.25.1-1.el9ap, python3.12-virtualenv 20.25.1-2.el9ap, ansible-automation-platform-26/controller-rhel9, ansible-automation-platform-27/controller-rhel9, ansible-automation-platform-25/ansible-dev-tools-rhel8, +4 moreaffected: workaround, no fix available, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 rhel8/python-36 Red Hat OpenShift AI (RHOAI) rhai-early-access/docling-serve-cuda-rhel9, rhoai/odh-pipeline-runtime-pytorch-cuda-py312-rhel9, rhoai/odh-pipeline-runtime-pytorch-rocm-py312-rhel9, rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9, rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9, rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9, +7 more Red Hat OpenShift Dev Spaces devspaces/udi-rhel9 Red Hat Satellite 6 satellite/iop-yuptoo-rhel9, satellite/iop-host-inventory-rhel9, satellite/iop-advisor-backend-rhel9 Red Hat Self-service automation portal 2 ansible-automation-platform/bootc-automation-portal-rhel9affected: workaround, no fix available
-
Red Hat Ansible Automation Platform 2.6 ansible-automation-platform-26/eda-controller-rhel9 1791945282, ansible-automation-platform-26/lightspeed-chatbot-rhel9 1791978798fixed: vendor fix RHSA-2026:87120
-
Red Hat Ansible Automation Platform 2.7 ansible-automation-platform-27/eda-controller-rhel9 1792141010fixed: vendor fix RHSA-2026:87124
-
Red Hat OpenShift AI 2.25 rhoai/odh-ta-lmes-job-rhel9 1791553527, rhoai/odh-feature-server-rhel9 1792148523fixed: vendor fix RHSA-2026:87410
-
Red Hat OpenShift AI 3.4 rhoai/odh-ta-lmes-job-rhel9 1791470318, rhoai/odh-kserve-agent-rhel9 1791468381, rhoai/odh-kserve-router-rhel9 1791468401, rhoai/odh-feature-server-rhel9 1791863220, rhoai/odh-kserve-controller-rhel9 1791468368, rhoai/odh-kserve-storage-initializer-rhel9 1790958549, +2 morefixed: vendor fix RHSA-2026:84734
-
Red Hat OpenShift AI 3.5 rhoai/odh-ta-lmes-job-rhel9 1792501995, rhoai/odh-training-rocm64-torch28-py312-rhel9 1791906128, rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9 1791825469fixed: vendor fix RHSA-2026:86891
show 4 moreshow fewer
-
Red Hat Ansible Automation Platform 2.6 ansible-automation-platform-26/hub-rhel9 1791947385, ansible-automation-platform-26/gateway-rhel9 1791971533, ansible-automation-platform-26/hub-web-rhel9 1791952205, ansible-automation-platform-26/receptor-rhel9 1791968536, ansible-automation-platform-26/mcp-tools-rhel9 1791941340, ansible-automation-platform-26/controller-rhel9 1791947602, +23 more Red Hat Ansible Automation Platform 2.7 ansible-automation-platform-27/hub-rhel9 1792388670, ansible-automation-platform-27/gateway-rhel9 1792429216, ansible-automation-platform-27/hub-web-rhel9 1792394496, ansible-automation-platform-27/receptor-rhel9 1792139928, ansible-automation-platform-27/mcp-tools-rhel9 1792425046, ansible-automation-platform-27/controller-rhel9 1792389457, +26 morenot affected: vulnerable code not present
-
Red Hat Hardened Images python3-mypy 1.18.2-6.hum1, python-urllib3 2.8.0-1.hum1, python-trustme 1.2.1-3.1.hum1, python-cryptography 50.0.0-1.hum1, python-charset-normalizer 3.5.1-1.hum1not affected: component not present
-
Red Hat OpenShift AI 2.25 rhoai/odh-rhel9-operator 1792570619, rhoai/odh-vllm-cpu-rhel9 1792018436, rhoai/odh-dashboard-rhel9 1791853525, rhoai/odh-modelmesh-rhel9 1790881700, rhoai/odh-operator-bundle 1792571069, rhoai/odh-vllm-cuda-rhel9 1791358976, +64 more Red Hat OpenShift AI 3.4 rhoai/odh-cli-rhel9 1791509689, rhoai/rhai-cli-rhel9 1791509689, rhoai/odh-automl-rhel9 1791535789, rhoai/odh-mlflow-rhel9 1791865967, rhoai/odh-autorag-rhel9 1791557539, rhoai/odh-trainer-rhel9 1791869783, +92 more Red Hat OpenShift AI 3.5 rhoai/odh-cli-rhel9 1791945905, rhoai/rhai-cli-rhel9 1791945905, rhoai/odh-automl-rhel9 1791916705, rhoai/odh-mlflow-rhel9 1791947857, rhoai/odh-autorag-rhel9 1791903266, rhoai/odh-trainer-rhel9 1791952138, +110 morenot affected: vulnerable code not present
-
Red Hat OpenShift Container Platform 4 python-virtualenv 20.25.1-2.el10apnot affected: vulnerable code not in execute path
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- last mo.
Exploit prediction
0.15% chance of exploitation in the next 30 days, higher than 3% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.8 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N |
| CNA | 4.0 | 5.8 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | virtualenv | <21.7.11 |
21.7.11 |
| bitnami | virtualenv | <21.7.11 |
21.7.11 |
Affected products
- pypa virtualenv
Classification
- Weakness
-
- CWE-93 Improper Neutralization of CRLF Sequences
References
-
github.com
/pypa/virtualenv/pull/3247
web
-
github.com
/pypa/virtualenv/commit/a30f995461043acb6cacbf3a890951563ccf7140
web, patch
-
github.com
/pypa/virtualenv/security/advisories/GHSA-9h9j-4vrj-gf7g
web
-
github.com
/pypa/virtualenv/releases/tag/21.7.11
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-102938
advisory, web
-
github.com
/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2026-4012.yaml
web
-
github.com
/pypa/virtualenv
package
-
pypi.org
/project/virtualenv
web, package
Sources
- CVE List CVE-2026-102938
- GitHub Advisory GHSA-9h9j-4vrj-gf7g
- NVD CVE-2026-102938
- OSV BIT-virtualenv-2026-102938
- OSV PYSEC-2026-4012
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.