home / blog

2026-11-08 · high

CVE-2026-19553: SSL hostname verification bypass in Python

SSL hostname verification bypass in Python when server_hostname is not provided to SSLContext.wrap_bio().

CVE-2026-19553: SSL hostname verification bypass in Python

CVE-2026-19553 is a flaw in Python's SSL module: ssl.SSLContext.wrap_bio() does not enforce server_hostname when check_hostname is True. If the parameter is not supplied, hostname verification is silently skipped. The program believes it is verifying the certificate, but it does not, enabling man-in-the-middle attacks on TLS communications. It affects Python applications handling HTTPS, API clients, web servers, and any software relying on Python for encrypted communications.

Severity is high: CVSS 7.6, High rating. Hostname verification is a fundamental TLS security control; silent bypass is dangerous because teams may not detect misconfiguration. An attacker in man-in-the-middle position can present a valid certificate for another domain and the server will accept it. A patch is available: update Python to latest version or apply the official patch. Recent GitHub signal (8 November 2026) documents a demonstration lab for the vulnerability.

In defense: audit Python code using ssl.SSLContext.wrap_bio(), asyncio.create_connection(), or asyncio.loop.start_tls(). Ensure server_hostname is always provided with a valid value (not None, not empty string). This action mitigates risk without a patch. Update Python to the latest version: the fix changes behavior from 'silent bypass' to 'ValueError' if server_hostname is missing, making configuration errors visible. Test SSL configurations and monitor logs for unexpected ValueError during transition.

For administrators and IT teams: if the Python environment is not updated and code does not provide server_hostname, every communication to external servers (APIs, cloud, remote databases) could be intercepted. An attacker on the network could present forged certificates and access sensitive data: API credentials, tokens, data in transit. Mitigation without update is essential in critical projects; upgrade must be planned and tested.

At a glance

What
A flaw in ssl.SSLContext.wrap_bio() and related APIs (asyncio.create_connection, asyncio.loop.start_tls) that permits hostname verification bypass if the server_hostname parameter is not provided, even with check_hostname=True. Verification is silently skipped, leaving TLS communications vulnerable.
Severity
CVSS 7.6, High rating. Hostname verification bypass exposes systems to man-in-the-middle attacks, enabling interception of encrypted communications.
Affected versions
Product and specific versions not reported in available documentation. Data indicates current Python versions are affected; verify official documentation for your environment.
Fix
Patch available. Update Python to the latest version or apply the official patch. The fix changes behavior from 'silent bypass' to 'ValueError generation' when server_hostname is not provided.
Status
Patch available. Recent GitHub signal (8 November 2026) documents a local demonstration lab for the vulnerability.
Action
Immediate action: audit code using ssl.SSLContext.wrap_bio(), asyncio.create_connection(), and asyncio.loop.start_tls(). Ensure server_hostname is always provided with a non-None, non-empty value. Update Python to the latest version. Test SSL configuration after update.

Sources: NVD, CVE-2026-19553

← All articles