{"id":"CVE-2026-19445","state":"PUBLISHED","title":"Use-after-free of a server-side SSLContext when sni_callback switches contexts","description":"A remote, unauthenticated TLS client can make a server crash or call\nthrough a freed pointer if its sni_callback assigns a different context to\nSSLSocket.context (the documented way to select a certificate per server\nname) and nothing else keeps the original ssl.SSLContext alive. Typical\ncases are servers that create an SSLContext per connection or replace it\nwhile connections are open; servers that wrap their listening socket with\nit are not affected.\n\n\nMitigation: keep a reference to every SSLContext that sets sni_callback for\nthe lifetime of the server. TLS clients are not affected.","publishedAt":"2026-09-30T16:16:04.923Z","updatedAt":"2026-10-03T00:36:46.398Z","severity":{"score":9.2,"label":"Critical","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.22","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.17","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.15","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.16","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.8","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0rc3","versionType":"python"}],"modules":["ssl"],"repo":"https://github.com/python/cpython"}],"references":["https://github.com/python/cpython/pull/158504","https://mail.python.org/archives/list/security-announce@python.org/thread/QMQIUQB6WGGC3MI7I3WKQXOYOBDSPPS3/","https://github.com/python/cpython/issues/156293","https://github.com/python/cpython/commit/34a53dce8174da2fceb12fe084a4def02a10053d","https://github.com/python/cpython/commit/46133cd57d309652139ada74014aca7665ac552b","https://github.com/python/cpython/commit/63fab143d94cafae71850831acfb52041ba44af7","https://github.com/python/cpython/commit/cd7e51e7d4563866fbaa1e2521ae69b45daf3698","https://github.com/python/cpython/commit/d8717ed01717a9641686e6e6f83f0ab8af235e2c","https://github.com/python/cpython/commit/b12968cefe69ca1dcb8606c832ff73ee7dbf4ba8","https://github.com/python/cpython/commit/ec44b5a3258cbda947d5e07242ee562ed05ef24b","http://www.openwall.com/lists/oss-security/2026/09/30/17"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:11:10.572Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/19xxx/CVE-2026-19445.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-19445","state":"PUBLISHED","datePublished":"2026-09-30T16:16:04.923Z","dateUpdated":"2026-10-03T00:36:46.398Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2026-08-10T13:31:21.724Z"},"containers":{"cna":{"title":"Use-after-free of a server-side SSLContext when sni_callback switches contexts","descriptions":[{"lang":"en","value":"A remote, unauthenticated TLS client can make a server crash or call\nthrough a freed pointer if its sni_callback assigns a different context to\nSSLSocket.context (the documented way to select a certificate per server\nname) and nothing else keeps the original ssl.SSLContext alive. Typical\ncases are servers that create an SSLContext per connection or replace it\nwhile connections are open; servers that wrap their listening socket with\nit are not affected.\n\n\nMitigation: keep a reference to every SSLContext that sets sni_callback for\nthe lifetime of the server. TLS clients are not affected."}],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.22","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.17","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.15","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.16","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.8","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0rc3","versionType":"python"}],"modules":["ssl"],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://github.com/python/cpython/pull/158504","tags":["patch"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/QMQIUQB6WGGC3MI7I3WKQXOYOBDSPPS3/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/issues/156293","tags":["issue-tracking"]},{"url":"https://github.com/python/cpython/commit/34a53dce8174da2fceb12fe084a4def02a10053d","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/46133cd57d309652139ada74014aca7665ac552b","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/63fab143d94cafae71850831acfb52041ba44af7","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/cd7e51e7d4563866fbaa1e2521ae69b45daf3698","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/d8717ed01717a9641686e6e6f83f0ab8af235e2c","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/b12968cefe69ca1dcb8606c832ff73ee7dbf4ba8","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/ec44b5a3258cbda947d5e07242ee562ed05ef24b","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"HIGH","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":9.2,"baseSeverity":"CRITICAL","exploitMaturity":"NOT_DEFINED","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","description":"CWE-416","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-10-03T00:36:46.398Z"},"credits":[{"lang":"en","type":"reporter","value":"Gregory P. Smith (https://github.com/gpshead)"},{"lang":"en","type":"coordinator","value":"Seth Larson (https://github.com/sethmlarson)"},{"lang":"en","type":"remediation reviewer","value":"Bénédikt Tran (https://github.com/picnixz)"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/09/30/17"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-09-30T18:09:39.735Z"}}]}}}