
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-19552 is an improper certificate validation vulnerability in CPython's ssl.get_server_certificate() function. When the ca_certs parameter is supplied, the function verifies the certificate chain but fails to check the identity (hostname) of the server certificate, enabling man-in-the-middle attacks. It affects CPython versions prior to 3.16.0a2 (and backport fixes are being applied to 3.11 through 3.15). The vulnerability was disclosed on November 9, 2026, and is rated LOW severity with a CVSS v4 base score of 0.0 by the GitHub Advisory Database, though Feedly estimates it as HIGH (Github Advisory, oss-security).
The root cause is classified as CWE-295 (Improper Certificate Validation). The CPython documentation for ssl.get_server_certificate() states that when ca_certs is provided, the call will attempt to validate the server certificate against those root certificates — however, the implementation only validates the certificate chain and never checks that the certificate's identity (hostname/Subject Alternative Name) matches the host being contacted (CPython Issue). This means an attacker positioned on the network can present any certificate signed by a trusted CA and have it accepted without hostname verification. The fix, merged in PR #161507, adds explicit hostname checking when ca_certs is supplied (CPython PR).
Successful exploitation allows a network-positioned attacker to perform man-in-the-middle (MitM) attacks against applications that use ssl.get_server_certificate() with a custom ca_certs parameter. The attacker can intercept, eavesdrop on, or manipulate SSL/TLS communications by presenting an arbitrary certificate signed by a trusted CA, bypassing the expected identity check. The primary risk is to confidentiality and integrity of data in transit for affected Python applications (Github Advisory, oss-security).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the disclosure date (Github Advisory). The EPSS score is approximately 0.31% (23rd percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires a network-adjacent attacker capable of intercepting TLS connections and presenting a certificate signed by a CA trusted by the victim application's ca_certs bundle.
ssl.get_server_certificate(addr, ca_certs=<path>) with a custom CA bundle to retrieve or validate a server certificate.ca_certs bundle — this does not need to match the target hostname.ssl.get_server_certificate() only validates the chain and not the hostname, the certificate is accepted without error, allowing the attacker to decrypt, read, or modify the communication (CPython Issue, CPython PR).Upgrade CPython to version 3.16.0a2 or later, which includes the fix that adds hostname verification when ca_certs is supplied to ssl.get_server_certificate(). Backport patches are being applied to CPython 3.11, 3.12, 3.13, 3.14, and 3.15 branches (CPython PR). As a workaround for applications that cannot immediately upgrade, replace calls to ssl.get_server_certificate() with ssl.create_default_context() configured with proper hostname checking enabled, which performs both chain and identity validation by default (Github Advisory).
Seth Larson of the Python Security team disclosed the vulnerability via the Python security-announce mailing list, classifying it as LOW severity (oss-security). The fix was labeled a release-blocker by CPython maintainer gpshead, indicating the Python core team considered it important enough to block releases until resolved (CPython PR). Community discussion was noted on infosec.exchange and Bluesky, though no significant controversy or widespread alarm was observed.
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
python3.7
bionic (esm-infra)
python2.7
devel
python3.14
focal (esm-apps)
python2.7
focal (esm-infra)
python3.8
jammy
python2.7
jammy (esm-apps)
python2.7
noble
python3.12
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."