PT-2026-105769 · Git · Cpython

Published

2026-09-30

·

Updated

2026-09-30

None

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
ssl.SSLContext.wrap bio() didn't require the server hostname argument to not be None if ssl.SSLContext.check hostname was set. Due to a missing parameter check in SSLObject, if the server hostname argument isn't supplied then hostname verification would be silently skipped.
This defect could lead to programs where certificate hostname verification appeared to be succeeding with SSLContext.check hostname = True and no ValueError being raised due to misconfiguration.
If the program passes a server hostname value that isn't an empty string or None to any of these APIs then certificate hostname verification proceeds as expected and the program is not affected by this vulnerability.
Mitigating this vulnerability doesn't require updating Python or applying the patch. To mitigate, pass a valid non-None and non-empty server hostname value to SSLContext.wrap bio(), asyncio.create connection(), or asyncio.loop.start tls() and certificate hostname verification will proceed as expected. Upgrading to the latest version of Python or applying the patch only changes the behavior from silently skipping hostname verification to raising a ValueError, similar to SSLContext.wrap socket(), when server hostname isn't supplied.
Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

PSF-2026-44

Affected Products

Cpython