BIT-libpython-2026-15310: zipfile: bzip2/LZMA/Zstandard members decompress without a max_length bound, defeating chunked-read memory limits
When decompressing crafted zip files using the bzip/LZMA/Zstandard
compressions, Python could use an attacker-controlled size to
pre-allocate memory, possibly resulting in memory exhaustion.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications that decompress attacker-controlled ZIP files using Python’s zipfile support for bzip2, LZMA, or Zstandard members are exposed. The impact described is memory exhaustion from attacker-controlled decompressed size information.
What must an attacker do to trigger the issue?
An attacker needs to provide a crafted ZIP file and have it decompressed by the affected application. User interaction is required according to the supplied vector, and no privileges are required.
Does limiting ZIP reads to chunks prevent the memory issue?
No. The issue occurs because these compression methods can decompress without a max_length bound, defeating chunked-read memory limits and allowing attacker-controlled pre-allocation.