Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

CPython SSLContext.wrap_bio() Hostname Verification Bypass (CVE-2026-19553)

CVE-2026-19553 is a hostname verification bypass in CPython's ssl module.

Published
Reading Time
3 min read
Dark glass index card with a thin red neon circuit trace growing from its surface, cover art for: a formatting template that turns into a running program

The Python Security Response Team says SSLContext.wrap_bio() did not require the server_hostname argument when SSLContext.check_hostname was set, so hostname checking silently failed to run. It scores CVSS 4.0 7.6 High and is fixed in CPython 3.10.22, 3.11.17, 3.12.15, 3.13.16 and 3.14.8.

What it allows

The Python Security Response Team says SSLContext.wrap_bio() did not require the server_hostname argument to be set when SSLContext.check_hostname was set. A missing parameter check in SSLObject let hostname verification silently skip.

The advisory says this let a program's certificate hostname check appear to succeed with check_hostname=True, with no ValueError raised to flag the misconfiguration. SSLContext.wrap_socket(), the synchronous counterpart, already raised in this case. asyncio.create_connection() and asyncio.loop.start_tls() can turn an empty server_hostname into None and call wrap_bio(), inheriting the same silent skip.

What an Attacker Gains

The advisory describes the risk this way: a network position between the client and the intended server can present a certificate that is valid for a different hostname. Because verification is skipped, the handshake completes, and the client treats the connection as authenticated without confirming the peer's identity. We leave out request and reproduction detail on purpose.

The bug mainly reaches code that calls SSLContext.wrap_bio() directly, or that reaches it through asyncio's TLS connection and upgrade functions, without passing a real server_hostname. The CVE record and the advisory name no specific framework; any Python networking code built this way inherits the gap. See our Certificate Authority entry for how hostname checks fit into certificate trust.

Mitigating Without an Upgrade

The advisory says upgrading is not required to mitigate this flaw. Passing a valid server_hostname value, one that is not None and not an empty string, to SSLContext.wrap_bio(), asyncio.create_connection() or asyncio.loop.start_tls() restores hostname verification right away.

How the Score Reads

The Python Security Response Team, the CNA, scores it CVSS 4.0 7.6 High with vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N. NVD lists this score as secondary and shows the entry as Awaiting Analysis. There is no CVSS 3.1 score in the record or NVD. See our CVSS entry for how to read the vector.

What CISA and the Record Say About Exploitation

CISA's SSVC decision, recorded in the NVD entry and dated 16 October 2026, scores exploitation as none and rates the bug not automatable. As of CISA catalog version 2026.11.06, the CVE is not in the Known Exploited Vulnerabilities catalog.

Who is affected

The CVE record lists every maintained CPython 3.x branch as affected, each before its fixed build. The pre-release 3.15 branch is affected too, before its own fixed release candidate.

The fix changes behavior, not just code. After the patch, an omitted server_hostname raises a ValueError instead of silently skipping the check, matching how SSLContext.wrap_socket() already behaved. Teams should expect new ValueErrors right after upgrading and treat each one as a configuration bug to fix, not a transient failure.

The advisory credits devdanzin as the reporter, Bhuvansh as analyst, Bénédikt Tran as remediation reviewer and Seth Larson as coordinator. Our vulnerability management guide covers how to plan a dependency upgrade like this one.

Timeline

  1. 11 Aug 2026

    The CVE ID is reserved, per the CVE record.

  2. 30 Sep 2026

    The Python Security Response Team publishes the security-announce advisory and the CVE record; NVD publishes its entry the same day.

  3. 16 Oct 2026

    The CVE record and NVD entry are last updated; CISA's SSVC decision in the NVD entry is dated the same day.

What to do

  1. Find Code That Omits server_hostname

    Search your codebase and dependencies for SSLContext.wrap_bio(), asyncio.create_connection() and asyncio.loop.start_tls() calls that do not pass server_hostname.

  2. Pass server_hostname Right Away

    The advisory says this mitigates the flaw without an upgrade. Pass a real, non-empty server_hostname value to each call you found.

  3. Upgrade CPython to the Fixed Build

    Move to 3.10.22, 3.11.17, 3.12.15, 3.13.16 or 3.14.8, whichever branch you run, so a missing server_hostname raises an error instead of staying silent.

  4. Re-check Libraries That Wrap TLS Over BIOs

    We recommend auditing any internal library or framework that wraps SSLContext.wrap_bio() itself, since it inherits this gap from CPython until its users upgrade.

  5. Watch Logs for New ValueErrors After Upgrading

    We recommend treating a new ValueError about server_hostname after an upgrade as a real configuration bug, not noise to silence.

Frequently Asked Questions

Which CPython versions does CVE-2026-19553 affect?

The CVE record lists every maintained 3.x branch before its fixed build: 3.10.22, 3.11.17, 3.12.15, 3.13.16 and 3.14.8, plus the 3.15 pre-release line before 3.15.0rc3.

Do I need to upgrade Python to fix this?

No. The advisory says passing a valid, non-empty server_hostname to the affected calls mitigates the flaw without an upgrade.

What changes after I upgrade or apply the patch?

The advisory says a missing server_hostname then raises a ValueError instead of silently skipping the check, matching SSLContext.wrap_socket().

Is CVE-2026-19553 in the CISA KEV catalog?

It is not, as of catalog version 2026.11.06. CISA's SSVC decision in the NVD entry scores exploitation as none.

Is there a public proof of concept?

Our GitHub search found repositories referencing CVE-2026-19553, the earliest created two days after the advisory. We did not run, clone or link them.

Sources

  1. CVE-2026-19553 RecordCVE Program / Python Software Foundation
  2. CVE-2026-19553NVD
  3. [CVE-2026-19553] SSLContext.wrap_bio() missing validation of server_hostname parameterPython security-announce mailing list
  4. Known Exploited Vulnerabilities CatalogCISA
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →