VAITP Dataset

← Back to the dataset

CVE-2026-97687

HTTPS proxy TLS settings leak into target TLS, enabling MITM on the proxy.

  • CVSS 7.6
  • CWE-295
  • Configuration Issues
  • Remote

urllib3 is an HTTP client library for Python. From 1.26.0 until 2.8.0, the proxy_ssl_context, proxy_assert_hostname, proxy_assert_fingerprint, ssl_context, cert_reqs, verify_mode, use_forwarding_for_https=True, and CERT_NONE configuration paths fail to remain separated because target-server TLS settings are incorrectly applied to the HTTPS proxy connection. The trigger is that an application uses an HTTPS proxy and configures target-server TLS settings that must remain separate from the proxy TLS handshake, including HTTPS forwarding with target-specific identity or credentials. Applying cert_reqs=CERT_NONE can overwrite proxy_ssl_context.verify_mode in place, and the mutation persists so later connections reusing the same context may connect to the HTTPS proxy without certificate verification. The attack mechanism is that an attacker intercepts and impersonates the HTTPS proxy after the effective proxy policy accepts the attacker's certificate. The impact is that the attacker can observe or modify forwarded traffic or receive a target TLS client certificate, while CONNECT tunneling still preserves the separate end-to-end target TLS connection. This issue is fixed in version 2.8.0.

CVSS base score
7.6
Published
2026-09-29
OWASP
A02 Cryptographic Failures
Orthogonal defect classification
Assignment
Code defect classification
Incorrect Assignment
Category
Configuration Issues
Subcategory
Server-Side Request Forgery (SSRF)
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
urllib3
Fixed by upgrading
Yes

Solution

Upgrade urllib3 to version 2.8.0 or newer.

Vulnerable code sample

import ssl
import urllib3

def fetch_via_proxy(url: str, proxy_url: str) -> bytes:
    # VULNERABLE: cert_reqs=CERT_NONE overwrites proxy SSL verification
    http = urllib3.ProxyManager(
        proxy_url,
        ssl_context=ssl.create_default_context(),
        cert_reqs=ssl.CERT_NONE,  # disables verification for both target and proxy
        proxy_ssl_context=ssl.create_default_context(),
    )
    resp = http.request('GET', url)
    return resp.data

Patched code sample

import ssl
import urllib3

def fetch_via_proxy(url: str, proxy_url: str) -> bytes:
    # FIX: keep proxy verification separate from target verification
    target_ctx = ssl.create_default_context()
    proxy_ctx = ssl.create_default_context()
    http = urllib3.ProxyManager(
        proxy_url,
        ssl_context=target_ctx,
        proxy_ssl_context=proxy_ctx,
        cert_reqs=ssl.CERT_REQUIRED,
    )
    resp = http.request('GET', url)
    return resp.data

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.

Cite this entry

@misc{vaitp:cve202697687,
  title        = {{HTTPS proxy TLS settings leak into target TLS, enabling MITM on the proxy.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-97687},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-97687/}}
}

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.