VAITP Dataset

← Back to the dataset

CVE-2026-113717

Virtualenv bypasses wheel digest verification for certain pip install commands.

  • CVSS 2.3
  • CWE-494
  • Cryptographic
  • Remote

virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInvoke.get_pip_install_cmd() handles –seeder pip –download by calling get_wheel(download=False) and then allowing pip to consult the configured index, bypassing virtualenv's download_wheel() and verify_wheel_digest() path. When virtualenv's default-index PyPI digest comparison remains enabled, an index candidate matching the bundled package and version can therefore be selected without comparison to PyPI SHA-256 metadata. Explicit custom-index settings already opt out of that comparison and remain outside this verification-bypass claim; the demonstrated configuration used a non-PyPI index while leaving the index environment variables unset so the comparison policy remained active. This condition does not independently defeat TLS or establish control of the index response. This issue is fixed in version 21.14.9.

CVSS base score
2.3
Published
2026-10-20
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Cryptographic
Subcategory
Cryptographic Implementation Error
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
virtualenv
Fixed by upgrading
Yes

Solution

Upgrade virtualenv to version 21.14.9 or later.

Vulnerable code sample

import os
from virtualenv import PipInvoke

def install_package(package_name):
    # VULNERABLE: bypasses wheel digest verification by using download=False
    pip_cmd = PipInvoke.get_pip_install_cmd(
        seeder="pip",
        download=False,  # triggers get_wheel(download=False) path
        args=[package_name],
    )
    env = os.environ.copy()
    os.execv(pip_cmd[0], pip_cmd)

Patched code sample

import os
from virtualenv import PipInvoke

def install_package(package_name):
    # FIX: enforce wheel download with verification
    pip_cmd = PipInvoke.get_pip_install_cmd(
        seeder="pip",
        download=True,   # forces download_wheel() and verify_wheel_digest()
        args=[package_name],
    )
    env = os.environ.copy()
    os.execv(pip_cmd[0], pip_cmd)

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • 🐛 fix(seed): verify wheels before caching (#3430) (pypa/virtualenv)
    src/virtualenv/seed/embed/pip_invoke.py, src/virtualenv/seed/embed/pip_invoke.py · PipInvoke.get_pip_install_cmd, src/virtualenv/seed/wheels/acquire.py, src/virtualenv/seed/wheels/acquire.py · download_wheel

Cite this entry

@misc{vaitp:cve2026113717,
  title        = {{Virtualenv bypasses wheel digest verification for certain pip install commands.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-113717},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-113717/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.