CVE-2026-15806: CWE-319 in Python Software Foundation CPython
A vulnerability in CPython's urllib.request HTTPPasswordMgr classes causes credentials registered for HTTPS URLs to be sent over HTTP requests to the same host, risking credential exposure to attackers who can redirect or downgrade connections. The flaw arises because the URL scheme was not considered when matching stored credentials to requested URLs. This can lead to credentials being transmitted in cleartext over HTTP. The issue is fixed by scoping credential matching by URL scheme, but users unable to upgrade should avoid making plain HTTP requests to hosts with registered credentials.
AI Analysis
Technical Summary
The HTTPPasswordMgr class and its subclasses in Python's urllib.request module did not consider the URL scheme when matching stored credentials to requested URLs. As a result, credentials stored for an HTTPS URL could be sent over HTTP requests to the same host, allowing an attacker who can redirect or downgrade connections to capture credentials in cleartext. Similarly, credentials stored for HTTP URLs could be sent over HTTPS requests. The fix scopes credential matching by URL scheme, ensuring credentials are only sent for requests with the same scheme. Credentials registered with a bare authority (without scheme) still match any scheme for compatibility. Users who cannot upgrade immediately are advised to avoid making HTTP requests to hosts with registered credentials to mitigate risk.
Potential Impact
An attacker capable of redirecting or downgrading client requests from HTTPS to HTTP can intercept credentials sent in cleartext due to the flawed credential matching. This compromises the confidentiality of authentication credentials, potentially enabling unauthorized access. The vulnerability affects the security of HTTP authentication in Python applications using urllib.request, particularly when redirects or downgrade attacks occur.
Mitigation Recommendations
No official fix or patch is explicitly stated in the provided data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Meanwhile, users unable to upgrade should ensure their applications do not make plain HTTP requests to hosts for which credentials are registered, for example by avoiding following redirects to HTTP URLs. This reduces the risk of credential exposure due to downgrade or redirect attacks.
CVE-2026-15806: CWE-319 in Python Software Foundation CPython
Description
A vulnerability in CPython's urllib.request HTTPPasswordMgr classes causes credentials registered for HTTPS URLs to be sent over HTTP requests to the same host, risking credential exposure to attackers who can redirect or downgrade connections. The flaw arises because the URL scheme was not considered when matching stored credentials to requested URLs. This can lead to credentials being transmitted in cleartext over HTTP. The issue is fixed by scoping credential matching by URL scheme, but users unable to upgrade should avoid making plain HTTP requests to hosts with registered credentials.
CVSS v4.0
Score 6.0medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The HTTPPasswordMgr class and its subclasses in Python's urllib.request module did not consider the URL scheme when matching stored credentials to requested URLs. As a result, credentials stored for an HTTPS URL could be sent over HTTP requests to the same host, allowing an attacker who can redirect or downgrade connections to capture credentials in cleartext. Similarly, credentials stored for HTTP URLs could be sent over HTTPS requests. The fix scopes credential matching by URL scheme, ensuring credentials are only sent for requests with the same scheme. Credentials registered with a bare authority (without scheme) still match any scheme for compatibility. Users who cannot upgrade immediately are advised to avoid making HTTP requests to hosts with registered credentials to mitigate risk.
Potential Impact
An attacker capable of redirecting or downgrading client requests from HTTPS to HTTP can intercept credentials sent in cleartext due to the flawed credential matching. This compromises the confidentiality of authentication credentials, potentially enabling unauthorized access. The vulnerability affects the security of HTTP authentication in Python applications using urllib.request, particularly when redirects or downgrade attacks occur.
Mitigation Recommendations
No official fix or patch is explicitly stated in the provided data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Meanwhile, users unable to upgrade should ensure their applications do not make plain HTTP requests to hosts for which credentials are registered, for example by avoiding following redirects to HTTP URLs. This reduces the risk of credential exposure due to downgrade or redirect attacks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-07-15T08:49:13.390Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a8482f3c6e8be03326f9af4
Added to database: 08/18/2026, 16:06:11 UTC
Last enriched: 08/18/2026, 16:21:07 UTC
Last updated: 08/18/2026, 16:21:07 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.