All vulnerabilities
CVE-2026-19445

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

Python Software Foundation CPythonRuntimes & languages
CVSS
9.2Critical
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.43%Chance of exploitation activity in the next 30 days, higher than 36% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in3.10.22Also 3.11.17, 3.12.15 and 3 moreCVE List
Published30 Sep 2026Updated 3 Oct 2026CVE List

What fixes it

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

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.

Text from CVE List

Affected versions 6

  • CPythonaffected: all versions before 3.10.22CVE List
  • CPythonaffected: 3.11.0 before 3.11.17CVE List
  • CPythonaffected: 3.12.0 before 3.12.15CVE List
  • CPythonaffected: 3.13.0 before 3.13.16CVE List
  • CPythonaffected: 3.14.0 before 3.14.8CVE List
  • CPythonaffected: 3.15.0a1 before 3.15.0rc3CVE List

References 10