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

CVE-2026-113717: virtualenv Authentication Bypass Vulnerability

CVE-2026-113717 is an authentication bypass flaw in virtualenv that allows attackers to bypass digest verification during pip package installation. This post explains its impact, affected versions, and mitigation steps.

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-113717 Overview

CVE-2026-113717 is a software integrity vulnerability in virtualenv, the Python tool for creating isolated virtual environments. Versions prior to 21.14.9 contain a flaw in PipInvoke.get_pip_install_cmd() that bypasses the standard wheel verification path when the --seeder pip --download option is used. The function calls get_wheel(download=False) and defers to pip's index lookup, skipping download_wheel() and verify_wheel_digest(). As a result, an index candidate matching the bundled package and version can be selected without comparison against PyPI SHA-256 metadata. The issue is tracked as [CWE-494: Download of Code Without Integrity Check] and is fixed in virtualenv 21.14.9.

Critical Impact

An attacker controlling an index response could substitute a package that matches the expected name and version while evading digest verification during virtual environment seeding.

Affected Products

  • virtualenv versions prior to 21.14.9
  • Python environments seeded with --seeder pip --download
  • Build systems and CI pipelines that create virtual environments using default-index PyPI configuration

Discovery Timeline

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

Technical Details for CVE-2026-113717

Vulnerability Analysis

The flaw resides in src/virtualenv/seed/embed/pip_invoke.py. When a user invokes virtualenv with --seeder pip --download, PipInvoke.get_pip_install_cmd() calls get_wheel(download=False). This path hands control to pip and allows it to consult the configured index directly. The normal virtualenv seeding flow performs digest verification through download_wheel() followed by verify_wheel_digest(), which compares SHA-256 metadata from PyPI. The --download branch skips both functions. An index candidate that matches the bundled package name and version is therefore installed without the digest comparison that the default policy would otherwise enforce.

Root Cause

The root cause is a missing integrity check in a secondary code path. The verification routine exists but is not reachable when download=False is passed to get_wheel(). Explicit custom-index configurations already opt out of PyPI digest comparison and remain outside the scope of this bypass. The demonstrated condition requires default PyPI index settings with the comparison policy active while a non-PyPI index serves the response.

Attack Vector

Exploitation requires an attacker-controlled index response reaching the client during environment seeding. The flaw does not independently defeat TLS or grant the attacker control of the index response. A separate condition such as a misconfigured mirror, dependency confusion scenario, or network position is needed to deliver the substituted candidate. User interaction is required to run the vulnerable virtualenv command.

python
# Security patch in src/virtualenv/seed/embed/pip_invoke.py
# Source: https://github.com/pypa/virtualenv/commit/7babec66e043e1cc8bc66869a063653898719d96

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

The patch routes downloads through a private staging directory where verification runs before any wheel enters the reusable cache. Pip then installs pinned versions from a temporary directory containing only the selected, verified wheels, eliminating the secondary index lookup.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-113717

Indicators of Compromise

  • Virtual environments created with virtualenv --seeder pip --download using versions earlier than 21.14.9
  • Wheels in local caches whose SHA-256 does not match PyPI metadata for the pinned version
  • Build logs showing pip index resolution during virtualenv seeding against a non-PyPI endpoint while PyPI comparison policy was expected

Detection Strategies

  • Inventory build servers and developer workstations for virtualenv installations and record versions reported by virtualenv --version
  • Audit CI configuration files and Dockerfiles for invocations that combine --seeder pip with --download
  • Compare locally cached wheel digests against authoritative PyPI SHA-256 values and flag mismatches

Monitoring Recommendations

  • Log and review outbound package index traffic from build infrastructure, alerting on hosts other than the expected pypi.org or sanctioned mirrors
  • Track Software Bill of Materials (SBOM) generation for Python builds and compare pinned versions to actually installed wheel hashes
  • Monitor virtualenv package upgrades across fleets to confirm progression to 21.14.9 or later

How to Mitigate CVE-2026-113717

Immediate Actions Required

  • Upgrade virtualenv to version 21.14.9 or later across developer workstations, container base images, and CI runners
  • Rebuild virtual environments created with vulnerable versions using the --seeder pip --download option
  • Review proxy and mirror configurations to ensure that package index traffic terminates on trusted endpoints

Patch Information

The fix is published in virtualenv 21.14.9 via Pull Request #3430 and commit 7babec66e. Full technical context is in GHSA-cx28-75q4-x26q. The patch verifies downloads in a private staging directory before promoting them to the shared wheel cache and installs pinned versions from a temporary directory without an additional index lookup.

Workarounds

  • Avoid the --seeder pip --download option until the upgrade is applied; use the default seeder path which routes through verify_wheel_digest()
  • Pin virtualenv to 21.14.9 or later in requirements files, lockfiles, and container images
  • Restrict package index resolution to a controlled internal mirror that enforces hash verification independently
bash
# Upgrade virtualenv and confirm version
python -m pip install --upgrade 'virtualenv>=21.14.9'
virtualenv --version

# Pin the fixed version in build requirements
echo 'virtualenv>=21.14.9' >> requirements-build.txt

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.