Skip to content
CVE-2026-113714

CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354)

Initial Access Persistence Last updated:

Detects exploitation and exposure of CVE-2026-113714 in the Python virtualenv tool (>= 21.7.12, < 21.14.9). virtualenv's download_wheel() writes package-index downloads directly into the reusable wheel cache and picks the verification target from pip's textual Saved output, so the integrity check can be bypassed (CWE-354). With default-index digest comparison enabled, a controlled package index can inject a misleading Saved line through a discarded link's data-requires-python attribute. This forged-line variant also requires knowledge of an absolute path to the genuine bundled wheel. A separate variant leaves a wheel that failed verification in the cache for later selection, and requires control over the downloaded data or archive selection. The issue does not by itself bypass TLS or establish control of default PyPI, and custom-index exceptions are outside the promised PyPI comparison. This detection surfaces virtualenv invocations that download seed wheels, cache writes to the virtualenv app-data wheel store, unexpected index endpoints or mirrors, and vulnerable virtualenv versions in the estate. The upstream advisory rates severity low (CVSS 4.0 base score 2.3). A reproducer was published with the advisory on 2026-10-17. Fixed in 21.14.9.

Based on pypa/virtualenv Security Advisory GHSA-494p-63j8-28p3

Vulnerability Intelligence

Public PoC

What is CVE-2026-113714 CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354)?

CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354) (CVE-2026-113714) maps to the Initial Access and Persistence tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Persistence
Microsoft Sentinel / Defender
kusto
// df00tech DF00-1eb4a311bc · https://df00tech.com/detections/CVE-2026-113714 · licence: https://df00tech.com/detections/licence
// virtualenv download_wheel() cache-poisoning surface (CVE-2026-113714)
let vulnDownload = DeviceProcessEvents
| where Timestamp > ago(30d)
| where FileName in~ ("python", "python3", "python.exe", "virtualenv", "virtualenv.exe")
| where ProcessCommandLine has "virtualenv"
| where ProcessCommandLine has_any ("--download", "--no-download", "seed", "download_wheel")
    or ProcessCommandLine has_cs "-m virtualenv"
| extend SuspectIndex = ProcessCommandLine has_any ("--index-url", "--extra-index-url", "-i ", "PIP_INDEX_URL")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, SuspectIndex, InitiatingProcessFileName;
let cacheWrites = DeviceFileEvents
| where Timestamp > ago(30d)
| where FolderPath has_any (@"virtualenv\wheel", "virtualenv/wheel", @".local\share\virtualenv", ".local/share/virtualenv", @"Application Support/virtualenv")
| where FileName endswith ".whl"
| where ActionType in ("FileCreated", "FileModified")
| project Timestamp, DeviceName, AccountName, FolderPath, FileName, InitiatingProcessCommandLine, InitiatingProcessFileName;
union vulnDownload, cacheWrites
| sort by Timestamp desc

Flags virtualenv seed-wheel download invocations (especially with custom/extra index URLs) and writes of .whl files into the virtualenv app-data wheel cache, which is the poisoned-cache sink for CVE-2026-113714.

high severity medium confidence

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceFileEvents

False Positives

  • Legitimate first-time virtualenv creation populating the wheel cache from PyPI over TLS
  • CI/CD build agents that routinely create virtual environments with a corporate PyPI mirror
  • Developers intentionally using --index-url to an internal, trusted package index

Query fingerprint DF00-1eb4a311bc · licence

Sigma logsource & community rules

The detection logic for CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354) (CVE-2026-113714) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Install vulnerable virtualenv version

    Expected signal: Process creation for pip install and virtualenv version check; package install file writes under site-packages.

  2. Test 2 Create environment with custom index-url triggering wheel cache write

    Expected signal: virtualenv process launch with --download and PIP_INDEX_URL; .whl file creation in ~/.local/share/virtualenv/wheel.

  3. Test 3 Simulate poisoned wheel reuse from cache

    Expected signal: File creation of a .whl in the virtualenv wheel cache followed by a virtualenv process reusing the cache directory.


Response Playbook

Triage

  1. Confirm the virtualenv version on the host(s): run `virtualenv --version` or `python -m virtualenv --version`; anything >= 21.7.12 and < 21.14.9 is vulnerable.
  2. Review the flagged command line: determine whether a non-default `--index-url`/`--extra-index-url` or `PIP_INDEX_URL` was used, and whether it points to an untrusted mirror or HTTP (non-TLS) endpoint.
  3. Inspect the virtualenv app-data wheel cache (e.g. `~/.local/share/virtualenv/wheel/` on Linux, `%APPDATA%\virtualenv\wheel\` on Windows) and list cached .whl files with timestamps and hashes.
  4. Determine how many environments may have reused the cached wheels since the suspicious write, as a single poisoned cache entry propagates to all later environment creations.

Containment

  1. Delete or quarantine the virtualenv wheel cache directory on affected hosts to stop further reuse of any potentially tampered wheels.
  2. Block or restrict virtualenv/pip to an authenticated, TLS-only trusted index (pin PIP_INDEX_URL and hashes) until upgrade is complete.
  3. Upgrade virtualenv to 21.14.9 or later across the estate and rebuild any environments created from the poisoned cache window.

Evidence Collection

  1. Collect the cached .whl files, their SHA256 hashes, and filesystem timestamps for integrity comparison against known-good PyPI hashes.
  2. Capture the full process command lines, parent process, user, and environment variables (PIP_INDEX_URL, PIP_EXTRA_INDEX_URL) for the virtualenv invocation.
  3. Preserve network/proxy logs showing the index endpoints contacted during the download_wheel() operation.

Escalation Criteria

  • ! Escalate to incident response if a cached wheel's hash does not match the authentic PyPI artifact, indicating actual cache poisoning.
  • ! Escalate if the suspicious index URL is external/untrusted or served over plaintext HTTP, or if poisoned wheels were reused to create production or build-system environments.

Investigation Guide

Forensic Artifacts

  • > virtualenv app-data wheel cache directory and .whl files with their hashes and timestamps
  • > Shell history / process logs showing virtualenv invocations and index-url arguments
  • > pip/virtualenv configuration files and PIP_INDEX_URL environment settings

Tuning Guidance

Baseline your approved internal PyPI mirror hostnames and suppress virtualenv invocations that target only those over TLS. Focus alerting on invocations using unrecognized or plaintext-HTTP index URLs, and on wheel-cache writes occurring outside known provisioning windows. Pair with a version-inventory feed so alerts prioritize hosts still running virtualenv < 21.14.9.


Hunting Queries

Enumerate hosts writing wheels into the virtualenv cache and all users invoking virtualenv to scope potential cache-poisoning exposure for CVE-2026-113714.

Hunting — KQL
kql
// df00tech DF00-1eb4a311bc · https://df00tech.com/detections/CVE-2026-113714 · licence: https://df00tech.com/detections/licence
DeviceFileEvents | where FolderPath has_any ("virtualenv/wheel", @"virtualenv\wheel") | where FileName endswith ".whl" | summarize count(), make_set(FileName) by DeviceName, bin(Timestamp, 1d)
Hunting — SPL
spl
``` df00tech DF00-1eb4a311bc · https://df00tech.com/detections/CVE-2026-113714 · licence: https://df00tech.com/detections/licence ```
sourcetype IN ("linux:process","Sysmon:Process") (process=*virtualenv* OR CommandLine=*virtualenv*) | stats values(host) as hosts count by user

Atomic Red Team Tests

Test 1 Install vulnerable virtualenv version
linux

Install a virtualenv version within the affected range to reproduce the vulnerable download_wheel() cache behavior in a lab.

Command

bash
python3 -m pip install 'virtualenv==21.14.8' && python3 -m virtualenv --version

Cleanup

bash
python3 -m pip install 'virtualenv>=21.14.9' || python3 -m pip uninstall -y virtualenv

Expected Telemetry

Process creation for pip install and virtualenv version check; package install file writes under site-packages.

Expected Detection

Version-inventory logic flags virtualenv in the >= 21.7.12, < 21.14.9 affected range.

Test 2 Create environment with custom index-url triggering wheel cache write
linux

Invoke virtualenv against a custom (lab) package index to drive download_wheel() to populate the unverified wheel cache.

Command

bash
PIP_INDEX_URL=http://127.0.0.1:8080/simple python3 -m virtualenv --download /tmp/cve_113714_env

Cleanup

bash
rm -rf /tmp/cve_113714_env ~/.local/share/virtualenv/wheel

Expected Telemetry

virtualenv process launch with --download and PIP_INDEX_URL; .whl file creation in ~/.local/share/virtualenv/wheel.

Expected Detection

KQL/SPL/EQL rules fire on virtualenv download invocation with custom index-url correlated to wheel-cache write.

Test 3 Simulate poisoned wheel reuse from cache
linux

Place a benign marker .whl into the virtualenv wheel cache and create a new environment to demonstrate silent cache reuse across environments.

Command

bash
mkdir -p ~/.local/share/virtualenv/wheel/house/3.11/pip && touch ~/.local/share/virtualenv/wheel/house/3.11/pip/poisoned_marker-0.0.1-py3-none-any.whl && python3 -m virtualenv /tmp/cve_113714_reuse

Cleanup

bash
rm -rf /tmp/cve_113714_reuse ~/.local/share/virtualenv/wheel/house/3.11/pip/poisoned_marker-0.0.1-py3-none-any.whl

Expected Telemetry

File creation of a .whl in the virtualenv wheel cache followed by a virtualenv process reusing the cache directory.

Expected Detection

File-event detection on wheel-cache .whl creation and correlation with subsequent virtualenv environment creation.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections