CVE-2026-19552: 
Python Interpreter vulnerability analysis and mitigation

Overview

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

Technical details

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

Impact

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

Exploitability

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.

Exploitation steps

  1. Identify target: Find a Python application that calls ssl.get_server_certificate(addr, ca_certs=<path>) with a custom CA bundle to retrieve or validate a server certificate.
  2. Position for MitM: Gain a network-adjacent position between the Python client and the target server (e.g., via ARP spoofing, DNS poisoning, or rogue Wi-Fi access point).
  3. Obtain a valid certificate: Acquire or generate a certificate signed by any CA trusted in the victim's ca_certs bundle — this does not need to match the target hostname.
  4. Intercept the TLS handshake: When the Python application initiates a connection, intercept it and present the attacker-controlled certificate.
  5. Certificate accepted: Because 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).

Mitigation and workarounds

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

Community reactions

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.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

python3.11

Affected

sid

python3.15

Affected

trixie

python3.13

Affected

Ubuntu

Unknown

bionic (esm-apps)

python3.7

Unknown

bionic (esm-infra)

python2.7

Unknown

devel

python3.14

Unknown

focal (esm-apps)

python2.7

Unknown

focal (esm-infra)

python3.8

Unknown

jammy

python2.7

Unknown

jammy (esm-apps)

python2.7

Unknown

noble

python3.12

Unknown

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

Source: This report was generated using AI

Related Python Interpreter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-115559MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • python3.16-debuginfo
NoYesNov 10, 2026
CVE-2026-124249MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • python3.12-idle
NoYesNov 09, 2026
CVE-2026-115791MEDIUM5.3
  • Python Interpreter logoPython Interpreter
  • python3
NoYesNov 10, 2026
CVE-2026-16052LOW2.3
  • Python Interpreter logoPython Interpreter
  • python3.14-freethreading-libs
NoYesNov 12, 2026
CVE-2026-19552NONEN/A
  • Python Interpreter logoPython Interpreter
  • python-tools
NoYesNov 09, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management