CVE-2026-15806
Python Interpreter vulnerability analysis and mitigation

Overview

CVE-2026-15806 is a credential disclosure vulnerability in Python's urllib.request module affecting the HTTPPasswordMgr class and its subclasses (HTTPPasswordMgrWithDefaultRealm and HTTPPasswordMgrWithPriorAuth). The flaw causes credentials registered for an https:// URL to also be sent over plain http:// to the same host, and vice versa, because the reduce_uri() method discards the URL scheme during credential matching. It affects CPython versions prior to 3.15.0 (with backports required for 3.10–3.14) and was disclosed on August 18, 2026. It carries a CVSS v4.0 base score of 6.0 (Medium) (GitHub Advisory, oss-security).

Technical details

The root cause is classified under CWE-319 (Cleartext Transmission of Sensitive Information) and CWE-522 (Insufficiently Protected Credentials). The HTTPPasswordMgr.reduce_uri() method in Lib/urllib/request.py strips the URL scheme when normalizing URIs for credential lookup, meaning https://example.com and http://example.com resolve to the same internal key. An attacker in an on-path position or capable of issuing an HTTPS-to-HTTP redirect can trigger the vulnerable Python client to transmit HTTPS-registered credentials over unencrypted HTTP, where they can be captured in cleartext. A public proof-of-concept was included in the original bug report, demonstrating that using HTTPPasswordMgrWithPriorAuth with is_authenticated=True causes the Authorization header to be added to an HTTP request for credentials registered under an HTTPS URL (CPython Issue #155694, CPython PR #155696).

Impact

Successful exploitation allows a network attacker to capture HTTP Basic Authentication credentials in cleartext that were intended only for HTTPS connections. The impact is limited to confidentiality — there is no integrity or availability impact — but stolen credentials can enable unauthorized access to protected resources, account takeover, or lateral movement if the same credentials are reused across services. Any Python application using urllib.request with HTTPPasswordMgr or its subclasses and registering credentials with scheme-qualified URLs is potentially affected (GitHub Advisory, oss-security).

Exploitability

A proof-of-concept script was published as part of the original bug report (CPython issue #155694), demonstrating the vulnerability without requiring a live server. The EPSS score is 0.0, indicating low current probability of exploitation in the wild, and there is no evidence of active exploitation or threat actor attribution at this time. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to be in an on-path network position or able to issue redirects, making it non-trivially automatable (CPython Issue #155694, GitHub Advisory).

Exploitation steps

  1. Identify a target application: Locate a Python application using urllib.request with HTTPPasswordMgr, HTTPPasswordMgrWithDefaultRealm, or HTTPPasswordMgrWithPriorAuth that registers credentials for an https:// URL and may follow HTTP redirects.
  2. Position for interception or redirect: Gain an on-path network position (e.g., ARP spoofing on a local network, rogue Wi-Fi access point) or control a server that can issue an HTTPS-to-HTTP redirect response (HTTP 301/302 pointing to http://).
  3. Trigger a downgrade: Cause the vulnerable Python client to follow a redirect from https://example.com/ to http://example.com/. Because reduce_uri() discards the scheme, the password manager matches the stored HTTPS credentials to the HTTP request.
  4. Capture credentials in cleartext: Intercept the resulting HTTP request on the network. The Authorization: Basic <base64> header will be present and decodable, exposing the plaintext username and password.
  5. Use captured credentials: Decode the Base64-encoded credentials and use them to authenticate against the target service or other services where credentials are reused (CPython Issue #155694, oss-security).

Indicators of compromise

  • Network: Unexpected HTTP (plaintext) requests to hosts that should only be accessed over HTTPS, containing an Authorization: Basic header; HTTP 301/302 redirect responses from HTTPS endpoints pointing to http:// URLs observed in network traffic captures.
  • Logs: Application or proxy logs showing HTTP requests (not HTTPS) to sensitive endpoints with Authorization headers; redirect chains in access logs transitioning from https:// to http:// for the same host.
  • Process/Application: Python application logs indicating unexpected HTTP connections to hosts registered with HTTPS credentials; unusual redirect-following behavior in urllib.request-based clients.

Mitigation and workarounds

Upgrade to a patched version of CPython: the fix was merged into main (targeting 3.16) on August 17, 2026, and backported to branches 3.10 through 3.15 (PRs #155968–#155973). Users who cannot upgrade immediately should ensure their applications never make plain http:// requests to hosts for which credentials are registered — specifically, configure applications to not follow redirects to http:// URLs. Credentials registered with a bare authority (e.g., example.com without a scheme) continue to match any scheme and are unaffected by the fix (CPython PR #155696, GitHub Advisory).

Community reactions

The Python Security team disclosed the vulnerability via the official security-announce@python.org mailing list on August 18, 2026, and it was forwarded to the oss-security list by Alan Coopersmith. The fix was reviewed and approved by CPython core developers Eclips4 and Seth Michael Larson before being merged. Community discussion was noted on Bluesky (infosec.skyfleet.blue) shortly after disclosure (oss-security, CPython PR #155696).

Additional resources


SourceThis report was generated using AI

Related Python Interpreter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-67422HIGH7.5
  • Python logoPython
  • open-webui
NoYesAug 06, 2026
CVE-2026-19672MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • python3.8
NoYesAug 19, 2026
CVE-2026-15806MEDIUM6
  • Python Interpreter logoPython Interpreter
  • python3.13
NoYesAug 18, 2026
CVE-2026-17084MEDIUM6
  • Python Interpreter logoPython Interpreter
  • python3
NoYesAug 18, 2026
CVE-2026-18503LOW2.4
  • Python Interpreter logoPython Interpreter
  • python2.7
NoYesAug 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management