[medium] Zip bomb: ZIP entries read fully into memory (ebook branch) #14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: medium
Affects: jtk/ebook-management
File: lib/fuzzy_catalog/ebooks/zip_reader.ex:44-75 (zstream collects all chunks), :100-110 (:zip.extract :memory)
A crafted EPUB/CBZ in a library with a multi-GB container.xml/OPF/cover can OOM the BEAM during a scan.
Fix: check the uncompressed size in the entry header before reading; stop collecting past a cap (e.g. 5 MB for XML, 50 MB for images).
Found by Nye's audit, 2026-10-18 (static review of main @
1d89af4and jtk/ebook-management @43a849e).