Opened 20 hours ago
Last modified 19 hours ago
#5910 new enhancement
python CVE-2026-6100
| Reported by: | Joe Locash | Owned by: | lfs-book |
|---|---|---|---|
| Priority: | highest | Milestone: | 13.1 |
| Component: | Book | Version: | git |
| Severity: | normal | Keywords: | |
| Cc: |
Description
There is a CRITICAL severity vulnerability affecting CPython.
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 created for each call. If the decompressor
instance is not re-used after an error condition, this usage is similarly
not vulnerable.
Please see the linked CVE ID for the latest information on affected
versions:
https://www.cve.org/CVERecord?id=CVE-2026-6100
https://github.com/python/cpython/pull/148396
Attachments (1)
Change History (2)
by , 18 hours ago
| Attachment: | Python-3.14.4-security_fixes-1.patch added |
|---|
I'm attaching a patch that addresses this, and CVE-2026-1502 which was also fixed after the release of 3.14.4.
Note:
See TracTickets
for help on using tickets.

At first I thought this was for cython, but it is indeed a module in Python-3.14.4 (ticket #5907).
It first looked like the pull request could be implemented with a single sed across three files, but the changes are slightly different for each file. We can use:
sed -i '596 a\ bzs->next_in = NULL;' Modules/_bz2module.c sed -i '1122a\ lzs->next_in = NULL;' Modules/_lzmamodule.c sed -i '1677a\ self->zst.next_in = NULL;' Modules/zlibmodule.c
We need line numbers since there are multiple instances of 'error:' in the files.
Note that the line numbers are different from the pull request for Python-3.14.4.