Skip to main content

CPython CVE-2026-19553

| EUVDEUVD-2026-90078 HIGH
Improper Validation of Certificate with Host Mismatch (CWE-297)
2026-09-30 PSF GHSA-xx9w-qm94-hghj
7.6
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain man-in-the-middle network position
  2. Delivery
    Intercept victim's TLS client connection
  3. Exploit
    Present valid-chain cert for wrong host
  4. Execution
    Hostname check silently skipped
  5. Impact
    Decrypt and tamper with TLS traffic

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate host validation
Exploitation Conditions

Exploitation requires BOTH an application-side misconfiguration and an attacker-side network position. Affected code must call ssl.SSLContext.wrap_bio(), asyncio.create_connection(), or asyncio.loop.start_tls() with SSLContext.check_hostname = True while passing server_hostname as None or an empty string - in that exact state SSLObject silently skips peer-identity verification (certificate chain is still validated, but the hostname is never matched). The attacker must additionally hold a man-in-the-middle position on the connection path and be able to present a certificate that chains to a CA the client trusts. LIMITING FACTORS: applications that pass any valid non-None, non-empty server_hostname are completely unaffected regardless of patch status; the flaw does not affect SSLContext.wrap_socket() (which already validated); and no remote exploitation is possible without an active network-intercept position. Mitigation does not require the patch - supplying a valid server_hostname fully resolves it; the patch merely converts the silent skip into a ValueError.

Impact

This is a genuine TLS security-control failure (CWE-297 improper certificate hostname validation), not a high-CVSS-but-low-impact issue, but its real-world risk is gated by two independent conditions that sharply narrow exposure. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:P, 7.6) encodes that exploitation is network-based and unauthenticated but carries an Attack Requirement (AT:P) - a man-in-the-middle position - and a passive user-interaction element. The high VC:H/VI:H reflect that a successful MITM fully compromises the confidentiality and integrity of the affected TLS channel; VA:N correctly shows no availability impact. Critically, the flaw only manifests in applications that use SSLContext.wrap_bio(), asyncio.create_connection(), or asyncio.loop.start_tls() with check_hostname=True AND pass server_hostname as None or an empty string - a developer misconfiguration that silently disables peer-identity checking while chain verification still succeeds. No EPSS score, CISA KEV listing, or public exploit is present in the provided data (no public exploit identified at time of analysis). The signals are internally consistent: network vector with a MITM attack requirement means targeted, not mass/automatable, exploitation. Treat as a defense-in-depth / correctness fix of moderate priority; urgency rises only for code that matches the specific affected pattern.

Exploit ScenarioDerived

A CPython application establishes a TLS client connection via asyncio.create_connection() or SSLContext.wrap_bio() with check_hostname=True but without supplying server_hostname (leaving it None or ''); the developer believes hostname verification is active. An attacker positioned on the network path (e.g., rogue Wi-Fi, ARP/DNS spoofing, or a compromised upstream) presents a certificate that is validly chained to a trusted CA but issued for a different hostname; because hostname matching is silently skipped, the connection succeeds and the attacker intercepts and modifies the traffic. No public exploit code is identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 30, 2026

Certificate hostname verification is silently skipped in CPython's TLS stack when an application enables SSLContext.check_hostname but supplies no server_hostname (None or an empty string) to SSLContext.wrap_bio(), asyncio.create_connection(), or asyncio.loop.start_tls(). In that exact state SSLObject still validates the certificate chain but never matches the peer's identity against the requested name, so an unauthenticated attacker holding a man-in-the-middle position on the connection path and a certificate chaining to a CA the client trusts can intercept traffic while the program believes hostname checking succeeded. Exploitation is gated by two independent conditions - the application-side misconfiguration and an active network-intercept position - no public exploit code has been identified at time of analysis, and applications that pass a valid non-empty server_hostname are completely unaffected regardless of patch status.

RemediationAI

The primary fix is at the call site, not the interpreter: pass a valid, non-None, non-empty server_hostname to SSLContext.wrap_bio(), asyncio.create_connection(), or asyncio.loop.start_tls() whenever the SSLContext has check_hostname = True - doing so restores full certificate hostname verification immediately and requires no Python upgrade. Upstream fix available (PR/commit at https://github.com/python/cpython/pull/158503); released patched version not independently confirmed, so verify with the vendor advisory at https://mail.python.org/archives/list/security-announce@python.org/thread/QNZRG3YOAMTHDCMVCICXGY6YEFPY2VDL/ before quoting a version. Applying the patch or upgrading only changes the behavior from a silent skip to a ValueError, so any code that currently passes server_hostname=None with check_hostname=True will start failing loudly after upgrade - audit call sites first. If call sites cannot be changed and no patched interpreter is available, compensating controls are: (1) set check_hostname=False and perform explicit hostname matching against the peer certificate obtained via getpeercert() - precise but must be applied consistently at every TLS entry point or the gap reopens; (2) add certificate or public-key (SPKI) pinning at the connection layer, which prevents an intercepted connection from being accepted even when the name check is skipped, at the cost of pin-rotation operational overhead; or (3) remove the MITM precondition by restricting outbound TLS to trusted network paths, which is environment-dependent and does not fix the application defect. Note that SSLContext.wrap_socket() users need no action and no public exploit code has been identified at time of analysis.

Affected VersionsENISA

CPython 0 <3.16.0

Affected Packages

euvd cpython fix: 3.16.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-297 (Improper Validation of Certificate with Host Mismatch) in CPython's ssl module, which wraps OpenSSL. SSLContext.wrap_socket() correctly raised ValueError when check_hostname was enabled without a server_hostname, but the parallel validation was missing from SSLObject.__init__()/SSLObject._create(), the entry point used by SSLContext.wrap_bio(). Because asyncio's SSLProtocol path (used by loop.create_connection() and loop.start_tls()) builds its TLS layer through wrap_bio(), loop.start_tls() defaulting server_hostname to None and create_connection() normalizing server_hostname='' to None both reached a state where the TLS handshake completed with the chain verified but the peer identity never checked against any name. The upstream fix factors the parameter validation into a shared helper, _check_sslobject_params(), and applies it from SSLObject.__init__() and _create() so wrap_bio() behaves like wrap_socket(): a ValueError('check_hostname requires server_hostname') is raised when check_hostname is enabled and no usable name is supplied. Note the failure mode is a verification control being skipped, not a cryptographic break - the certificate chain check itself continued to run.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PSF) PRIMARY 7.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 7.4 HIGH

AC:H because exploitation needs both a man-in-the-middle position and an app that omits server_hostname; PR:N/UI:N as no auth or victim action is needed; C:H/I:H for full channel MITM, A:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 6.8 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Red Hat 7.4 HIGH

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A defect in CPython's TLS stack (CVE-2026-19553) causes certificate hostname verification to be silently skipped when applications enable check_hostname but pass no server name to common TLS entry points, allowing an attacker positioned on the network path to intercept encrypted sessions while the application reports verification success. Because CPython underpins a large share of internal services, APIs and automation, any affected deployment can suffer exposure of customer or corporate data and subsequent breach-notification and compliance obligations, even though exploitation requires both a coding misconfiguration and a network-intercept position. No public exploit code has been identified at time of analysis, and the vendor has issued a patch.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Ubiquitous
CPython is the reference Python interpreter, deployed almost everywhere
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SLES15-SP5-CHOST-BYOS-SAP-CCloud Not-Affected
SLES15-SP5-CHOST-BYOS-SAP-CCloud Affected
SLES15-SP6-CHOST-BYOS Not-Affected
SLES15-SP6-CHOST-BYOS Affected
SLES15-SP6-CHOST-BYOS-Aliyun Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy