Skip to content
CVE-2026-113714 Sumo Logic CSE · Sumo

Detect CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354) in Sumo Logic CSE

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

MITRE ATT&CK

Tactic
Initial Access Persistence

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
// df00tech DF00-1eb4a311bc · https://df00tech.com/detections/CVE-2026-113714 · licence: https://df00tech.com/detections/licence
_sourceCategory=*os* OR _sourceCategory=*endpoint* 
| where (toLowerCase(_raw) matches "*virtualenv*") 
| where (toLowerCase(_raw) matches "*--index-url*" or toLowerCase(_raw) matches "*--extra-index-url*" or toLowerCase(_raw) matches "*download_wheel*" or toLowerCase(_raw) matches "*seed*" or (toLowerCase(_raw) matches "*.whl*" and toLowerCase(_raw) matches "*virtualenv*wheel*")) 
| parse regex "(?<cmd>virtualenv[^\"]*)" nodrop 
| if(toLowerCase(_raw) matches "*index-url*", "yes", "no") as suspect_index 
| count by _sourceHost, suspect_index, cmd 
| sort by _count
high severity low confidence

Detects virtualenv seed-download command lines and wheel-cache writes indicative of CVE-2026-113714 cache poisoning, highlighting custom package-index usage.

Data Sources

Linux process logsWindows Sysmon logs

Required Tables

_sourceCategory=os/linux_sourceCategory=endpoint/sysmon

False Positives & Tuning

  • First-run virtualenv seeding from PyPI
  • CI runners provisioning environments with approved mirrors
  • Local developer environment rebuilds

Other platforms for CVE-2026-113714


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