# CVE-2026-6100: Use-after-free in lzma.LZMADecompressor, bz2.BZ2Decompressor, and gzip.GzipFile after re-use under memory pressure

> Attackers can trigger a use-after-free in Python decompression modules under memory pressure, potentially leading to code execution or crashes.

- **Severity:** Critical 9.1 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/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:** 13 Apr 2026
- **Updated:** 13 Aug 2026
- **Also known as:** ALPINE-CVE-2026-6100, AZL-83051, BELL-CVE-2026-6100, BIT-libpython-2026-6100, BIT-python-2026-6100, BIT-python-min-2026-6100, CLSA-2026-1777548230, CLSA-2026-1777568294, CLSA-2026-1777569671, CLSA-2026-1777660524, CLSA-2026-1777940008, CLSA-2026-1778147559, CLSA-2026-1778489354, CLSA-2026-1778831359, CLSA-2026-1792809372, DEBIAN-CVE-2026-6100, ECHO-5806-1424-7b47, GHSA-pg25-7cx5-cvcm, MINI-38vr-qf4m-ffgm, MINI-qvqj-gjcr-wrwf, MINI-rgr8-97mm-628x, MINI-rgx9-32f2-vvq5, MINI-rhv9-rq76-f4q8, PSF-0000-CVE-2026-6100, PSF-2026-18, RHSA-2026:52400, ROOT-OS-ALPINE-320-CVE-2026-6100, UBUNTU-CVE-2026-6100

## What is CVE-2026-6100?

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

### Official description

Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memory allocation fails with a `MemoryError` and the decompression instance is re-used. This scenario can be triggered if the process is under memory pressure. The fix cleans up the dangling pointer in this specific error condition.

The vulnerability is only present if the program re-uses decompressor instances across multiple decompression calls even after a `MemoryError` is raised during decompression. Using the helper functions to one-shot decompress data such as `lzma.decompress()`, `bz2.decompress()`, `gzip.decompress()`, and `zlib.decompress()` are not affected as a new decompressor instance is used per call. If the decompressor instance is not re-used after an error condition, this usage is similarly not vulnerable.

Weakness: CWE-825 (Expired Pointer Dereference), CWE-787 (Out-of-bounds Write), CWE-416 (Use After Free)

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

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.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5 |
| `python` | Bitnami | All versions | 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5 |
| `python-min` | Bitnami | All versions | 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5 |
| `python3` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-debug` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-debuginfo` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-devel` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-idle` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-libs` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-test` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |
| `python3-tkinter` | Red Hat:rhel_els:7 | All versions | 0:3.6.8-21.el7_9.7 |

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

Upgrade libpython to a fixed version for your release line: 3.10.21, 3.11.16, 3.12.14 or 3.13.14.

## Is CVE-2026-6100 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-6100 is a critical use after free vulnerability in CPython, published on 13 Apr 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-6100 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5
- python (Bitnami): affected all versions; fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5
- python-min (Bitnami): affected all versions; fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5

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-6100/ (Markdown: https://insights.sbomify.com/CVE-2026-6100/index.md)
```

## Sources

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

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