CVE-2026-19445

Use-after-free of a server-side SSLContext when sni_callback switches contexts

State
Published
Severity
9.2 Critical
Published
Sep 30, 2026
Updated
Oct 3, 2026
Reserved
Aug 10, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
4.09.2 CriticalCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:NPSF

Weaknesses

Affected Products

ProductVersions
CPythonPython Software Foundation
  • before 3.10.22Affected
  • 3.11.0 to before 3.11.17Affected
  • 3.12.0 to before 3.12.15Affected
  • 3.13.0 to before 3.13.16Affected
  • 3.14.0 to before 3.14.8Affected
  • 3.15.0a1 to before 3.15.0rc3Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.