# CVE-2026-15806: `HTTPPasswordMgr` can send saved HTTPS credentials via HTTP because of incorrect scheme matching

> An attacker can capture HTTPS credentials in cleartext by downgrading connections to HTTP due to incorrect scheme matching in Python's urllib.request module.

- **Severity:** Medium 6.0 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 18 Aug 2026
- **Updated:** 2 Oct 2026
- **Also known as:** ALPINE-CVE-2026-15806, AZL-96867, BELL-CVE-2026-15806, BIT-libpython-2026-15806, BIT-python-2026-15806, BIT-python-min-2026-15806, DEBIAN-CVE-2026-15806, ECHO-d825-d451-60e0, GHSA-2v69-2w5x-455j, MINI-53qf-6hp2-vq4r, MINI-5hf4-68qw-99m9, MINI-p84m-j8qx-5xjj, MINI-rcpr-vrrj-vvwg, MINI-xr38-v2q7-rrvg, PSF-2026-36, UBUNTU-CVE-2026-15806

## What is CVE-2026-15806?

CVE-2026-15806 is a medium-severity vulnerability in CPython, published on 18 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The HTTPPasswordMgr class in the urllib.request module, along with its subclasses HTTPPasswordMgrWithDefaultRealm and HTTPPasswordMgrWithPriorAuth, did not take the URL scheme into account when matching stored credentials against a requested URL. Credentials added for an https:// URL were also used for requests to the same host over http://, so an attacker able to redirect or downgrade a client to plain HTTP (for example, via an HTTPS-to-HTTP redirect or an on-path position) could capture credentials in cleartext. Credentials added for http:// URLs could likewise be sent over https://.

Credential matching is now scoped by URL scheme. Credentials registered with a URL that includes a scheme are only used for requests with the same scheme. Credentials registered with a bare authority (such as example.com or example.com:8080) continue to match any scheme, preserving compatibility with existing code, including proxy authentication.

Users who cannot upgrade immediately can mitigate by ensuring that applications never make plain http:// requests to hosts for which credentials are registered, for example by not following redirects to http:// URLs.

Weakness: CWE-522 (Insufficiently Protected Credentials), CWE-319 (Cleartext Transmission of Sensitive Information)

## Which versions are affected by CVE-2026-15806?

3 open source packages ship an affected version, including libpython, python and python-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 |
| `python` | Bitnami | All versions | 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 |
| `python-min` | Bitnami | All versions | 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 |

## How do I fix CVE-2026-15806?

Upgrade libpython to a fixed version for your release line: 3.10.22, 3.11.17, 3.12.15 or 3.13.16.

## Is CVE-2026-15806 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-15806 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-15806 and fix it if it is affected.

What it is: CVE-2026-15806 is a medium-severity vulnerability in CPython, published on 18 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-15806 exists.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8
- python (Bitnami): affected all versions; fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8
- python-min (Bitnami): affected all versions; fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-15806/ (Markdown: https://insights.sbomify.com/CVE-2026-15806/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-15806
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-15806
- OSV: https://osv.dev/vulnerability/CVE-2026-15806

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-15806/
Summaries are generated and may contain mistakes; the official description above is the record.
