Detect CVE-2026-113714: virtualenv download_wheel() Index Download Cache Poisoning (CWE-354) in IBM QRadar
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
QRadar Detection Query
-- df00tech DF00-1eb4a311bc · https://df00tech.com/detections/CVE-2026-113714 · licence: https://df00tech.com/detections/licence
SELECT QIDNAME(qid) AS event, logsourcename(logsourceid) AS log_source, "Process CommandLine" AS cmd, "Filename" AS filename, "Process Name" AS process, username, DATEFORMAT(starttime,'yyyy-MM-dd HH:mm:ss') AS time
FROM events
WHERE ("Process Name" ILIKE '%virtualenv%' OR "Process CommandLine" ILIKE '%virtualenv%')
AND ("Process CommandLine" ILIKE '%--index-url%' OR "Process CommandLine" ILIKE '%--extra-index-url%' OR "Process CommandLine" ILIKE '%download_wheel%' OR "Process CommandLine" ILIKE '%seed%' OR ("Filename" ILIKE '%.whl' AND "Filename" ILIKE '%virtualenv%wheel%'))
ORDER BY starttime DESC LAST 30 DAYS Surfaces virtualenv download/seed command activity and wheel-cache file writes associated with the unverified-integrity download path in CVE-2026-113714.
Data Sources
Required Tables
False Positives & Tuning
- Standard virtualenv creation populating the seed wheel cache
- Corporate mirror usage via index-url in developer tooling
- Build pipeline environment seeding
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.
- Test 1 Install vulnerable virtualenv version
Expected signal: Process creation for pip install and virtualenv version check; package install file writes under site-packages.
- 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.
- 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
- 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.
- 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.
- 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.
- 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
- Delete or quarantine the virtualenv wheel cache directory on affected hosts to stop further reuse of any potentially tampered wheels.
- Block or restrict virtualenv/pip to an authenticated, TLS-only trusted index (pin PIP_INDEX_URL and hashes) until upgrade is complete.
- Upgrade virtualenv to 21.14.9 or later across the estate and rebuild any environments created from the poisoned cache window.
Evidence Collection
- Collect the cached .whl files, their SHA256 hashes, and filesystem timestamps for integrity comparison against known-good PyPI hashes.
- Capture the full process command lines, parent process, user, and environment variables (PIP_INDEX_URL, PIP_EXTRA_INDEX_URL) for the virtualenv invocation.
- 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.
// 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) ``` 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
Install a virtualenv version within the affected range to reproduce the vulnerable download_wheel() cache behavior in a lab.
Command
python3 -m pip install 'virtualenv==21.14.8' && python3 -m virtualenv --version Cleanup
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.
Invoke virtualenv against a custom (lab) package index to drive download_wheel() to populate the unverified wheel cache.
Command
PIP_INDEX_URL=http://127.0.0.1:8080/simple python3 -m virtualenv --download /tmp/cve_113714_env Cleanup
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.
Place a benign marker .whl into the virtualenv wheel cache and create a new environment to demonstrate silent cache reuse across environments.
Command
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
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.