Skip to content
Threat Brief

← All advisories

CVE-2026-102938

Medium 5.8No known exploitationFix available

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

Record last updated

CVSS score

5.8

Medium on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.2%

Higher than 5% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

Description

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.

Weakness: CWE-93

Patching and mitigation

Patch status
Fix available (source: NVD (reference tagged Patch))
Fix documented (source date)
Mitigation
None documented
Vendor guidance
msrc.microsoft.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
Microsoftazl3 python-virtualenv 20.36.1-6 on Azure Linux 3.0Not documented20.36.1-9Microsoft MSRC
Microsoftazl4 python-virtualenv 20.35.4-6.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC
virtualenvvirtualenvall versions before 21.7.1121.7.11NIST NVD

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Advisory change

    Microsoft advisory revised (2.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  3. Advisory change

    Microsoft advisory revised (3.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  4. Advisory change

    Microsoft advisory revised (4.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  5. Advisory change

    Microsoft advisory revised (5.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  6. Patch

    Fix documented by NVD (reference tagged Patch)

    Source: NVD (reference tagged Patch) (opens in a new tab)

Vendor guidance and references