Read the docs

virtualenv writes prompt values into pyvenv.cfg without sanitizing line boundaries, allowing configuration injection

Priority LOW 25CWE-93Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
—
Confidentiality · integrity · availability
Low · High · Low
Fix status
Partial Red Hat: 5 fixed, 7 without a fix

Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00146 3rd percentileScored 2026-11-07
Fix Partial virtualenv (pypa): 21.7.11virtualenv (PyPI): 21.7.11Red Hat: 5 advisoriesRed Hat: 5 fixed, 7 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pypavirtualenvbefore 21.7.1121.7.11Patch availableCNA
—virtualenv (PyPI)before 21.7.1121.7.11Patch availableGHSA-9h9j-4vrj-gf7g
  • virtualenv Vendorpypa Affected before 21.7.11 Fixed in 21.7.11 Patch available CNA
  • virtualenv (PyPI) Vendor— Affected before 21.7.11 Fixed in 21.7.11 Patch available GHSA-9h9j-4vrj-gf7g

Remediation

  • Fix · CNA virtualenv (pypa) Fixed in 21.7.11
  • Fix · GHSA-9h9j-4vrj-gf7g virtualenv (PyPI) Fixed in 21.7.11 Advisory →

Red Hat 5 advisories

  • RHSA-2026:87410 Released 2026-10-21 · Red Hat rating Critical
    RHOAI 2.25.12 - Red Hat OpenShift AI
    • Red Hat OpenShift AI 2.25 registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-caikit-nlp-rhel9, registry.redhat.io/rhoai/odh-codeflare-operator-rhel9 +47
  • RHSA-2026:87124 Released 2026-10-21 · Red Hat rating Critical
    Red Hat Ansible Automation Platform 2.7 Container Release Update
    • Red Hat Ansible Automation Platform 2.7 registry.redhat.io/ansible-automation-platform-27/de-supported-rhel9, registry.redhat.io/ansible-automation-platform-27/eda-controller-rhel9, registry.redhat.io/ansible-automation-platform-27/ee-supported-rhel9 +8
  • RHSA-2026:87120 Released 2026-10-21 · Red Hat rating Critical
    Red Hat Ansible Automation Platform 2.6 Container Release Update
    • Red Hat Ansible Automation Platform 2.6 registry.redhat.io/ansible-automation-platform-26/eda-controller-rhel9, registry.redhat.io/ansible-automation-platform-26/ee-supported-rhel9, registry.redhat.io/ansible-automation-platform-26/gateway-rhel9 +8
Show 2 more Red Hat advisories
  • RHSA-2026:86891 Released 2026-10-21 · Red Hat rating Critical
    RHOAI 3.5.2 - Red Hat OpenShift AI
    • Red Hat OpenShift AI 3.5 registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-built-in-detector-rhel9, registry.redhat.io/rhoai/odh-cli-rhel9 +47
  • RHSA-2026:84734 Released 2026-10-19 · Red Hat rating Critical
    RHOAI 3.4.5 - Red Hat OpenShift AI
    • Red Hat OpenShift AI 3.4 registry.redhat.io/rhoai/odh-ai-gateway-payload-processing-rhel9, registry.redhat.io/rhoai/odh-automl-rhel9, registry.redhat.io/rhoai/odh-autorag-rhel9 +47

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
OpenShift LightspeedAffectedNo fix yet
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat Enterprise Linux 8AffectedNo fix yet
Red Hat OpenShift AI (RHOAI)AffectedNo fix yet
Red Hat OpenShift Dev SpacesAffectedNo fix yet
Red Hat Satellite 6AffectedNo fix yet
Self-service automation portal 2AffectedNo fix yet
Red Hat Ansible Automation Platform 2.6Fixed RHSA-2026:87120
Red Hat Ansible Automation Platform 2.7Fixed RHSA-2026:87124
Red Hat OpenShift AI 2.25Fixed RHSA-2026:87410
Red Hat OpenShift AI 3.4Fixed RHSA-2026:84734
Red Hat OpenShift AI 3.5Fixed RHSA-2026:86891
Not affected: 7 products
  • Red Hat Ansible Automation Platform 2.6
  • Red Hat Ansible Automation Platform 2.7
  • Red Hat Hardened Images
  • Red Hat OpenShift AI 2.25
  • Red Hat OpenShift AI 3.4
  • Red Hat OpenShift AI 3.5
  • Red Hat OpenShift Container Platform 4

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-102938
  2. 2026-10-03 Alias added: GHSA-9h9j-4vrj-gf7g
  3. 2026-10-16 Affected versions changed · Red Hat
  4. 2026-10-20 Fix available: RHSA-2026:84734 · Red Hat
  5. 2026-10-20 Fix available: Red Hat OpenShift AI 3.4 · Red Hat
  6. 2026-10-22 Fix available: RHSA-2026:87124 · Red Hat
  7. 2026-10-22 Fix available: RHSA-2026:87120 · Red Hat
  8. 2026-10-22 Fix available: RHSA-2026:86891 · Red Hat
  9. 2026-10-22 Fix available: RHSA-2026:87410 · Red Hat
  10. 2026-10-23 Fix available: Red Hat Ansible Automation Platform 2.6, Red Hat Ansible Automation Platform 2.7, Red Hat OpenShift AI 2.25 +1 · Red Hat

References

  • TI-2025-29803 setuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write CVSS 4.0HIGH 7.7
  • TI-2024-05888 Remote Code Execution in pypa/setuptools CVSS 3.0HIGH 8.8
  • TI-2026-78525 Shell command injection in virtualenv generated POSIX launchers CVSS 3.1HIGH 7.8
  • TI-2026-78526 Command injection in virtualenv bash activation prompt CVSS 4.0HIGH 7.1
  • TI-2026-78521 Code injection in virtualenv Xonsh activation script CVSS 4.0HIGH 7.1
  • TI-2026-19377 wheel Allows Arbitrary File Permission Modification via Path Traversal CVSS 3.1HIGH 7.1
See all 36 →

Sources