BIT-python-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 archives using Python and ZIP members compressed with bzip2, LZMA, or Zstandard are exposed. The impact described is memory exhaustion through attacker-controlled allocation sizes.
What must an attacker do to exploit it?
An attacker needs to provide a crafted ZIP file and induce the application to decompress it. The vector is network-accessible, but user interaction is required according to the supplied severity vector.
Does reading ZIP content in chunks prevent the issue?
No. The issue specifically affects these compression methods because decompression occurs without a max_length bound, defeating chunked-read memory limits.