Python Software Foundation CPython
Use-after-free of a server-side SSLContext when sni_callback switches contexts
A remote, unauthenticated TLS client can make a server crash or call through a freed pointer if its sni_callback assigns a different context to SSLSocket.context (the documented way to select a certificate per server name) and nothing else keeps the original ssl.SSLContext alive. Typical cases are servers that create an SSLContext per connection or replace it while connections are open; servers that wrap their listening socket with it are not affected. Mitigation: keep a reference to every SSLContext that sets sni_callback for the lifetime of the server. TLS clients are not affected.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 3.10.22
- >= 3.11.0, < 3.11.17
- >= 3.12.0, < 3.12.15
- >= 3.13.0, < 3.13.16
- >= 3.14.0, < 3.14.8
- >= 3.15.0a1, < 3.15.0rc3
Fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8, 3.15.0rc3
Mitigation
Upgrade CPython to 3.10.22 or 3.11.17 or 3.12.15 or 3.13.16 or 3.14.8 or 3.15.0rc3 or later.
References
Timeline
Days relative to CVE publicationFirst public PoC 1.4 days after publication; not in CISA KEV. First PoC: abraxas/cve-2026-19445-sni-uaf (created 2 Oct 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| abraxas/cve-2026-19445-sni-uaf | 2 Oct 2026 +1.4 d | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.