CVE-2026-6100

High

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.

SeverityHigh
CVSS8.1
Exploit probability—
ProductCPython
PublishedApr 13, 2026
First seenApr 13, 2026

How to fix

Affected products

ProductAffected versionsFixed in
Python Software Foundation CPythonv < 3.10.21, 3.11.0 ≤ v < 3.11.16, 3.12.0 ≤ v < 3.12.14, 3.13.0 ≤ v < 3.13.14, 3.14.0a1 ≤ v < 3.14.5rc1, 3.15.0a1 ≤ v < 3.15.0b13.10.21, 3.11.16, 3.12.14, 3.13.14, 3.14.5rc1, 3.15.0b1

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.