---
id: "CVE-2026-19552"
page: "https://infrastack.ai/live/CVE-2026-19552"
kind: "vulnerability"
aliases: ["CVE-2026-19552"]
title: "Python: ssl.get_server_certificate skips hostname check when ca_certs is given"
severity: "unknown"
cvss: 0.0
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["python", "runtime"]
not_affected_if: ["no-ca-certs-argument", "no-get-server-certificate-calls"]
published_at: "2026-11-09T15:17:21+00:00"
first_seen_at: "2026-11-09T15:27:07+00:00"
updated_at: "2026-11-09T15:28:13+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19552", "first_seen_at": "2026-11-09T15:27:07+00:00"}]
exploit_sources: []
---

# Python: ssl.get_server_certificate skips hostname check when ca_certs is given

Link for people: https://infrastack.ai/live/CVE-2026-19552 (this .md is for agents)

When a ca_certs file is passed to ssl.get_server_certificate(), Python verifies the certificate chain but does not check that the certificate matches the server's identity. A script relying on this call could be fooled into trusting a certificate that was issued for another host.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Search your code for calls to `ssl.get_server_certificate(` that pass `ca_certs=`
- Check your Python version with `python3 --version` against the fixed versions below

## Timeline

- 2026-11-09T15:27:07+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-19552

## Documents

- [advisory] Python security-announce: [Security-announce][CVE-2026-19552] ssl.get_server_certificate(addr, ca_certs=...) verifies the chain but never the identity https://mail.python.org/archives/list/security-announce@python.org/message/SXBD6BGHDBTGM4KSUMQEWYIQ5RO4BQ76/

## From the sources

When ca_certs parameter was supplied to ssl.get_server_certificate() function, the identity of the certificate is not checked.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
