The solution
The classic denial-of-service archive was the recursive zip bomb: 42.zip nests six layers of zip files and reaches 4.5 PB only if the unzipper keeps unpacking nested archives. Most real parsers unzip once, so the top layer yields a trifling 0.6 MB, and scanners defended themselves by capping recursion depth and decompressed size. The attack everyone knew had the shape of a tree.
David Fifield's move was to remove the recursion. He compresses a single kernel of repeated bytes, then points tens of thousands of central-directory entries at overlapping ranges of those bytes, quoting each intervening local file header inside DEFLATE non-compressed blocks so ordinary parsers still see distinct, well-formed files. Every byte of the kernel is decompressed once per file, so output grows quadratically in input, and the bomb detonates in one unzip.
The numbers outran every earlier construction: at 42,374 bytes, the size of 42.zip's outer layer, the archive expands to 5.5 GB (a ratio of 129,000); the 10 MB version expands to 281 TB, a ratio over 28 million and 99.97% of the zip format's theoretical maximum; with the Zip64 extension, 46 MB expands to 4.5 PB. USENIX accepted the write-up for its WOOT 2019 workshop and awarded it Best Paper.
The release became a live test of the industry's defenses. VirusTotal scans of the 10 MB sample timed out across many engines; ClamAV burned CPU until its detection was patched, then repatched; Mark Adler wrote an overlapping-file detector for UnZip that Debian shipped while SUSE declined (CVE-2019-13232); Chromium added metrics for anomalous compression ratios; and Apple mitigated iOS Quick Look cache exhaustion in iOS 14.
What it achieved
Overlap many files on one compressed kernel so every stored byte expands N times
Why it worked
It attacks the assumption under the standard defense: scanners limited recursion depth, so a bomb that expands fully in one pass looks ordinary until it floods the disk.
Overlapping makes the ratio superlinear, because each stored byte contributes to every output file, so the archive grows deadlier as it gets bigger rather than adding a fixed factor per layer.
Compatibility was engineered in with matching names, correct CRCs and plain DEFLATE, so the demo ran on Info-ZIP, Python, Go and Android parsers instead of a corner case.
Fifield shipped working samples and paired the attack with the fix, overlap detection and parser sandboxing, which turned a curiosity into patches vendors could adopt.
What can be applied
When defenders patch one shape of attack, change the shape: overlapping files made recursion optional and depth limits useless. Bound time and disk inside the parser instead of enumerating signatures.
Aftermath
Mark Adler's overlap detector reached UnZip and Debian, ClamAV first checked adjacent pairs only, then imposed a time limit, D's std.zip learned to reject overlaps, Chromium added anomalous-ratio metrics, and Apple mitigated iOS 12/13 Quick Look exhaustion in iOS 14. VirusTotal runs documented engines that timed out, and antivirus vendors updated detection through 2019. Google Safe Browsing flagged all of bamsoftware.com from late July to mid-August 2019, briefly breaking Tor's Snowflake broker, and Xfinity blocked the page in November 2019. Fifield won Best Paper at USENIX WOOT 2019.
FOLLOW THE EVIDENCE
The sources
- A better zip bomb bamsoftware.com
- A better zip bomb (Best Paper), USENIX WOOT 19 usenix.org
- A better zip bomb — Hacker News discussion news.ycombinator.com