External risk intelligence

TLS Sni Callback Use-After-Free Vulnerability Affects Python Servers

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-19445

The vulnerability affects server-side TLS implementations using sni_callback. It is network-reachable but requires a non-standard coding pattern where SSLContext objects are dynamically created or replaced per connection without persistent references. Standard server deployments are typically unaffected, making public exposure conditional on specific implementation practices.

Use After Free

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This vulnerability involves how certain server applications manage security contexts during secure connections. If specific, less common coding patterns are used, it could lead to unexpected server crashes. The primary concern is to confirm if any of our systems utilize these particular configurations.

  • Server crashes from specific security context handling.
  • Confirm if this specific coding pattern applies.
  • Assess potential impact and relevance.

Attack Path

How an attacker could exploit the issue

An attacker could target a TLS server that dynamically manages its SSL contexts. By exploiting a specific scenario where a server assigns a new context within the `sni_callback` and does not maintain a reference to the original, the attacker could trigger a use-after-free condition. This could lead to a server crash or other memory corruption issues.

  • Unauthenticated network access is required.
  • Triggered by a specific server-side TLS callback.
  • Can cause server crashes or memory corruption.

Live Threat

Current exploitation, exposure, and threat context

A remote, unauthenticated attacker could cause a server to crash or execute code through a freed pointer. This could occur when a server's TLS implementation uses a `sni_callback` to assign a different SSL context to a socket, and no other mechanism keeps the original SSL context alive. Such a scenario might happen if a server creates a new SSL context for each connection or replaces an existing one while connections are active.

  • Server crash or code execution.
  • Incorrect SSL context management.
  • Service disruption or compromise.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability impacts Python TLS server implementations that dynamically manage SSLContext objects without maintaining persistent references, potentially leading to crashes. Responsibility likely falls to application owners or platform teams managing these Python TLS services. The initial focus should be on identifying affected instances, assessing their exposure and criticality, and confirming ownership before planning remediation.

  • Application owners should manage the issue.
  • Verify dynamic SSLContext management practices.
  • Plan remediation based on identified risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Python's SSLContext and how is it used?

SSLContext objects in Python manage settings for TLS connections, such as certificates and protocol versions. They are used by servers to establish secure, encrypted communication channels with clients. When a server needs to support multiple hostnames, it often uses an sni_callback to dynamically select the correct certificate for each incoming request.

What does CVE-2026-19445 mean by a use-after-free weakness?

A use-after-free (CWE-416) occurs when a program continues to use a memory address after that memory has been cleared or released. In this CVE, the vulnerability happens if the original SSLContext object is deleted while a TLS connection is still trying to access it, causing the server to reference invalid memory, which leads to crashes.

How does an attacker trigger this vulnerability?

An attacker triggers this by initiating a TLS connection to a server that uses a specific, non-standard coding pattern. The server must be configured to replace the SSLContext within an sni_callback without keeping a persistent reference to the original context. Standard server setups that wrap the listening socket and maintain stable references are not affected.

Is my server at risk if it is exposed to the internet?

Halo Surface Signal indicates the risk depends on your implementation, not just your network presence. While the vulnerability is reachable over the network, your server is only susceptible if it employs the specific, dynamic SSLContext replacement pattern mentioned. If your server does not create or replace these objects on a per-connection basis, it is likely not affected.

What steps should I take to address this issue?

First, review your application code to identify any use of sni_callback within your TLS server configurations. Ensure that any SSLContext used for these callbacks is stored in a way that keeps the object alive for the entire lifetime of the server. This simple reference management prevents the memory issues described in the advisory.

References