
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-19445 is a use-after-free (UAF) vulnerability in CPython's ssl module affecting server-side TLS connections that use sni_callback to dynamically assign SSLContext objects per connection. A remote, unauthenticated TLS client can trigger a server crash or call through a freed pointer when the sni_callback assigns a different context to SSLSocket.context and no other reference keeps the original ssl.SSLContext alive. Affected CPython versions include all releases before 3.10.22, 3.11.0–3.11.16, 3.12.0–3.12.14, 3.13.0–3.13.15, 3.14.0–3.14.7, and 3.15.0a1–3.15.0rc2. The vulnerability was discovered by Gregory P. Smith in collaboration with Claude and Anthropic Research, reported internally on August 23, 2026, and publicly disclosed on September 30, 2026. It carries a CVSS v4.0 base score of 9.2 (Critical) (GitHub Advisory, oss-security).
The root cause is CWE-416 (Use After Free): CPython's ssl module registers the SSLContext object with OpenSSL as the servername-callback argument via a borrowed pointer, without holding a reference or unregistering it upon deallocation. When sni_callback replaces SSLSocket.context with a new SSLContext and the original context is garbage-collected, the underlying SSL_CTX structure outlives the Python object — OpenSSL still consults the stale callback pointer on a subsequent ClientHello of the same connection. An attacker can deliberately provoke this second ClientHello via a TLS 1.3 HelloRetryRequest or, on OpenSSL builds that permit it, via renegotiation, controlling the timing of the use-after-free. Observed outcomes on release builds include deterministic crashes, silent skips (stale slot is NULL), invocation of an unrelated live object as the SNI callback, and use of bytes from concurrent client requests as the callback pointer — the last scenario being the most severe (CPython Issue #156293, CPython PR #158504). A public proof-of-concept Python script demonstrating the UAF condition is available (PoC GitHub).
Successful exploitation can result in server crashes (denial of service), memory corruption, or — in the most severe scenario — potential arbitrary code execution via a corrupted function pointer derived from concurrent request bytes. The vulnerability is triggered pre-authentication on the first flight of a TLS connection, meaning any network-reachable client can exploit it without credentials. Servers dynamically creating or replacing SSLContext per connection (e.g., gunicorn with an SNI-selecting ssl_context hook) are at risk; servers that wrap their listening socket with a single long-lived SSLContext are not affected. TLS clients are not affected by this vulnerability (CPython Issue #156293, GitHub Advisory).
A public proof-of-concept exploit (Python script) is available on GitHub, demonstrating the UAF condition by triggering garbage collection and forcing a HelloRetryRequest to confirm the freed-pointer state (PoC GitHub). The PoC does not achieve remote code execution but confirms the vulnerability is reproducible. As of the time of disclosure, there is no evidence of active in-the-wild exploitation and no known threat actor attribution. The EPSS score is approximately 0.43% (36th percentile), indicating a relatively low near-term exploitation probability. The vulnerability is not currently listed in the CISA KEV catalog (GitHub Advisory).
sni_callback to dynamically assign a different SSLContext per connection, running CPython versions before 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8, or 3.15.0rc3.ClientHello with a Server Name Indication (SNI) extension. This triggers the server's sni_callback, which assigns a new SSLContext to SSLSocket.context and allows the original context to be garbage-collected.SSLContext has no remaining Python references so it is freed by CPython's garbage collector, leaving OpenSSL holding a dangling pointer to the deallocated object.HelloRetryRequest (or initiate renegotiation on OpenSSL builds that permit it) to cause the server to invoke the now-freed callback pointer. The attacker controls the timing of this step.HelloRetryRequest messages or renegotiation attempts from a single client IP against a Python TLS server; repeated TLS handshake initiations from the same client without completing the session.ssl module or OpenSSL callback path; error messages referencing freed or invalid SSLContext objects.core, core.<pid>) in the server's working directory following unexpected crashes of the Python TLS server process.The Python Software Foundation has released patched versions for all supported branches: 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8, and 3.15.0rc3. Upgrading to a patched version is the recommended remediation. As an immediate workaround on unpatched versions, maintain a long-lived reference to every ssl.SSLContext that has sni_callback set for the entire lifetime of the server (e.g., build the context once and return the same object from the hook rather than creating a new one per connection). On OpenSSL 1.1.1 builds, additionally set ssl.OP_NO_RENEGOTIATION on the initial context to reduce the attack surface. Servers that wrap their listening socket with a single SSLContext are not affected and require no action (oss-security, CPython Issue #156293).
The Python Security team (Seth Larson) announced the vulnerability as CRITICAL severity via the security-announce@python.org mailing list on September 30, 2026, and coordinated backports across all supported branches (oss-security). The fix was credited to Gregory P. Smith, who discovered the issue in collaboration with Claude and Anthropic Research. The vulnerability was flagged as a release-blocker in the CPython issue tracker, reflecting its severity. Community discussion appeared on Mastodon and Bluesky shortly after disclosure, and multiple Linux distribution security teams (Red Hat, SUSE, Debian, AlmaLinux, openSUSE) issued advisories and updated packages within days of the public disclosure.
Fix availability across major Linux distributions and their releases.
bookworm
python3.11: 3.11.2-6+deb12u9
sid
python3.15: 3.15.0~rc3-1
trixie
python3.13
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
RHEL 8
:appstream:python3-0:3.6.8-79.el8_10.src
RHEL 9
:appstream:python3.12-0:3.12.15-1.el9_8.src
RHEL 10
python3.12-0:3.12.15-1.el10_2.src
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."