# CVE-2026-19445: Use-after-free of a server-side SSLContext when sni_callback switches contexts

> Remote attackers can crash servers or execute code via use-after-free in Python's SSL module when sni_callback switches contexts without retaining references.

- **Severity:** Critical 9.2 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Sep 2026
- **Updated:** 3 Oct 2026
- **Also known as:** ALPINE-CVE-2026-19445, AZL-105690, BELL-CVE-2026-19445, BIT-libpython-2026-19445, BIT-python-2026-19445, BIT-python-min-2026-19445, CLSA-2026-1791413715, CLSA-2026-1791424578, CLSA-2026-1791425064, CLSA-2026-1791425564, CLSA-2026-1791433868, CLSA-2026-1791434571, CLSA-2026-1791434822, CLSA-2026-1791461442, CLSA-2026-1791521362, CLSA-2026-1791532612, CLSA-2026-1791559300, CLSA-2026-1791965784, CLSA-2026-1791967190, CLSA-2026-1792404857, DEBIAN-CVE-2026-19445, ECHO-aad0-2bf5-8da2, GHSA-7jvw-f348-84gq, MINI-4f6w-rg88-qgm7, MINI-797v-r5rr-hch2, MINI-9795-r28f-qw2v, MINI-gxwr-2ppw-f5rm, MINI-rm8c-jh7w-x3cp, PSF-2026-43, RHSA-2026:74867, ROOT-OS-DEBIAN-13-CVE-2026-19445, SUSE-SU-2026:4919-1, UBUNTU-CVE-2026-19445

## What is CVE-2026-19445?

CVE-2026-19445 is a critical use after free vulnerability in CPython, published on 30 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2026-19445?

3 open source packages ship an affected version, including libpython, python and python-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 |
| `python` | Bitnami | All versions | 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 |
| `python-min` | Bitnami | All versions | 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8 |
| `python3.15` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-debug` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-devel` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading-debug` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading-devel` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading-idle` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading-libs` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading-test` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-freethreading-tkinter` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-idle` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-libs` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-test` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python3.15-tkinter` | Red Hat:hummingbird:1 | All versions | 0:3.15.0~rc2-1.1.hum1 |
| `python` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 2.7.18-150000.139.1 |
| `python-base` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 2.7.18-150000.139.2 |

## How do I fix CVE-2026-19445?

Upgrade libpython to a fixed version for your release line: 3.10.22, 3.11.17, 3.12.15 or 3.13.16.

## Is CVE-2026-19445 being exploited?

There is no known exploitation of CVE-2026-19445 in the wild and no public exploit code.

Public exploit code:

- CPython - Critical - SNI SSLContext UAF (github_poc): https://github.com/abraxas/cve-2026-19445-sni-uaf

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-19445 and fix it if it is affected.

What it is: CVE-2026-19445 is a critical use after free vulnerability in CPython, published on 30 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-19445 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8
- python (Bitnami): affected all versions; fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8
- python-min (Bitnami): affected all versions; fixed in 3.10.22, 3.11.17, 3.12.15, 3.13.16, 3.14.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-19445/ (Markdown: https://insights.sbomify.com/CVE-2026-19445/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-19445
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-19445
- OSV: https://osv.dev/vulnerability/CVE-2026-19445

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-19445/
Summaries are generated and may contain mistakes; the official description above is the record.
