Skip to main content
Vulnerability Database/CVE-2026-113714

CVE-2026-113714: virtualenv Information Disclosure Flaw

CVE-2026-113714 is an information disclosure vulnerability in virtualenv that allows attackers to inject misleading data through package-index downloads. This post covers the technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-113714 Overview

CVE-2026-113714 is a wheel verification flaw in virtualenv, the widely used Python tool for creating isolated environments. Prior to version 21.14.9, the download_wheel() function writes package-index downloads directly into the reusable wheel/house cache before selecting a verification target from pip's textual Saved output. A controlled package index can inject a misleading Saved line through a discarded link's data-requires-python attribute, causing the wrong archive to be hashed. A digest mismatch leaves the rejected archive in the cache for later selection without verification, undermining the integrity guarantee defined in [CWE-354].

Critical Impact

An attacker-controlled package index can plant unverified wheel archives in the reusable cache, where they may later be installed without digest verification.

Affected Products

  • virtualenv versions prior to 21.14.9
  • Python environments provisioned with the pip seeder embedded in virtualenv
  • Workflows that rely on default-index digest comparison against PyPI

Discovery Timeline

  • 2026-10-20 - CVE CVE-2026-113714 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-113714

Vulnerability Analysis

The flaw is an insufficient verification of data authenticity in the seed-wheel download path. virtualenv historically trusted pip's human-readable Saved <path> output to identify the file it should hash and compare against expected PyPI digests. Because that line is parsed as text, a package index can influence which path virtualenv treats as the download target.

Two exploitation variants exist. The forged-line variant abuses the data-requires-python attribute of a discarded link to inject a counterfeit Saved line pointing at an absolute path of the genuine bundled wheel. Virtualenv hashes the wrong path, the digest comparison fails, and the attacker's archive remains in the shared cache. The rejected-cache-file variant does not require the forged line but needs control over downloaded data or archive selection.

Root Cause

The root cause is ordering and trust. download_wheel() writes the downloaded archive into the reusable cache before verification, and it selects the verification target from pip's textual output rather than from a controlled staging location. Rejected archives are not purged after a digest mismatch, so a later install can select the unverified file.

Attack Vector

Exploitation requires network access to a package index that an attacker controls or can influence, plus user action to run virtualenv against that index. The forged-line path additionally requires knowledge of the absolute path to the bundled wheel. Explicit custom-index exceptions fall outside the PyPI comparison promise, and the issue does not bypass TLS or seize control of default PyPI on its own.

text
# Patch note from docs/changelog/3430.bugfix.rst
Verify downloads in a private staging directory before adding them to the reusable wheel cache. Select the downloaded
archive from that directory instead of pip's output. The pip seeder now uses the same download verification path and
installs pinned versions from a temporary directory containing only the selected wheels, without another index lookup.
Seeded packages retain version pins in pip freeze output.
# Source: https://github.com/pypa/virtualenv/commit/7babec66e043e1cc8bc66869a063653898719d96
python
# Fix in src/virtualenv/seed/embed/pip_invoke.py
import logging
from contextlib import contextmanager
from pathlib import Path
from shutil import copyfile
from subprocess import Popen
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING, Final

from virtualenv.seed.embed.base_embed import BaseEmbed
from virtualenv.seed.wheels import get_wheel, pip_wheel_env_run
from virtualenv.seed.wheels.acquire import PIP_RUN
from virtualenv.seed.wheels.util import Version
from virtualenv.util.subprocess import LogCmd
# Source: https://github.com/pypa/virtualenv/commit/7babec66e043e1cc8bc66869a063653898719d96

The patch introduces TemporaryDirectory and copyfile so wheels are verified in isolation before being promoted into the shared cache.

Detection Methods for CVE-2026-113714

Indicators of Compromise

  • Unexpected wheel archives present in the virtualenv wheel/house cache that do not match PyPI digests.
  • Build or CI logs showing virtualenv digest mismatch warnings followed by successful later installs using the same filename.
  • Package index requests directed at hosts other than the organization's approved PyPI mirror during virtualenv bootstrap.

Detection Strategies

  • Inventory installed virtualenv versions across developer workstations and CI runners; flag any release below 21.14.9.
  • Compare hashes of cached wheels under the virtualenv app-data directory against known-good PyPI digests on a scheduled basis.
  • Alert on virtualenv processes that resolve to non-approved index URLs via --index-url or PIP_INDEX_URL environment variables.

Monitoring Recommendations

  • Monitor outbound DNS and TLS SNI from build agents for unexpected package index domains.
  • Capture process command lines for python -m virtualenv and pip invocations in endpoint telemetry to retain index arguments.
  • Track changes to shared virtualenv cache directories using file integrity monitoring on multi-user build hosts.

How to Mitigate CVE-2026-113714

Immediate Actions Required

  • Upgrade virtualenv to version 21.14.9 or later on all developer, server, and CI/CD systems.
  • Purge the existing virtualenv wheel cache (~/.local/share/virtualenv/wheel on Linux, equivalent paths on macOS and Windows) to remove any unverified archives.
  • Restrict virtualenv and pip to vetted indexes using explicit --index-url configuration and network egress policies.

Patch Information

The fix is published in GitHub Release 21.14.9 and tracked in GitHub Pull Request 3430. Technical details are documented in GitHub Security Advisory GHSA-494p-63j8-28p3 and the upstream commit 7babec6.

Workarounds

  • Pin virtualenv invocations to the official PyPI index and reject custom indexes until upgrade is complete.
  • Disable the shared wheel cache by setting VIRTUALENV_DOWNLOAD=0 and VIRTUALENV_NO_PERIODIC_UPDATE=1 to force per-run fresh downloads where feasible.
  • Isolate CI jobs so that each build uses a disposable cache directory, preventing cross-job reuse of unverified wheels.
bash
# Configuration example: upgrade and clear the virtualenv cache
python -m pip install --upgrade "virtualenv>=21.14.9"
rm -rf "$HOME/.local/share/virtualenv/wheel"
python -m virtualenv --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.