Skip to content
Aback ZIP

Basics · 6 min read · Updated

What is a ZIP bomb?

A ZIP bomb is a small archive that expands to gigabytes. Learn how they work, the warning signs, how Aback ZIP limits decompression and what to do with one.

A ZIP bomb is a small archive designed to expand into far more data than its size suggests, with the aim of filling a disk or freezing the program that opens it. ZIP Safety Check reads the archive index and warns about extreme ratios, sizes and entry counts before anything is extracted. Looking at the file list is safe; extracting it carelessly is the risk.

How a small file becomes a huge one

ZIP records a compressed size and an uncompressed size for every entry. Compression works by replacing repetition with short references, so a file of a billion identical bytes can compress to a few megabytes. The archive is honest about the size: the header says what the entry will expand to. The attack works when the extracting program trusts the header and tries to write or hold all of it at once.

The original example, known as zip of death, was a few kilobytes that expanded to gigabytes. Modern variants use nested archives: one small ZIP contains many more ZIPs, each of which contains more data, so a scanner that only looks one level deep sees something harmless. Another trick has many entries refer to the same compressed bytes, multiplying the output without multiplying the input.

A high compression ratio is not proof of malice. A log file of repeated lines or a disk image of zeros compresses enormously by legitimate means. Ratio is a warning sign to investigate, not a verdict.

Warning signs in the archive index

SignWhy it matters
An entry claiming gigabytes of uncompressed data in a tiny archiveEither legitimate repetition or a bomb; decide before extracting
Uncompressed size far above the compressed size, across many entriesThe total expansion is what exhausts memory and disk
Tens or hundreds of thousands of entriesEven listing them can overwhelm a weak tool; some extractors struggle above 100,000
Archives inside archives, several levels deepEach layer can multiply the data; check the depth
A password with no explanation, or an unexpected attachmentEncrypted contents cannot be inspected by many scanners

Check before you extract

  1. Open ZIP Viewer and read the sizes and entry count. It parses the central directory only, so a huge archive opens without decompressing its contents.
  2. Open ZIP Safety Check for a structured verdict. It reports high ratios, large uncompressed totals, unsafe paths and deep nesting as findings with a severity.
  3. Ask where the file came from. Bombs are usually delivered as unexpected attachments or downloads from untrusted mirrors.
  4. If you must inspect the contents, extract a single small entry rather than everything.

Safety Check is not an antivirus and does not look inside file contents. A malicious PDF with an ordinary name will not be flagged. The wider pre-open checklist is in is this ZIP file safe?.

How Aback ZIP limits the damage

The decoders do not allocate the full declared output in one step. They cap each decompression step at 8 MB of output and resume on the next step, so memory stays roughly constant even for extreme ratios. Tools also warn before extracting archives with extreme sizes, ratios or entry counts, and very large outputs still need to fit in the browser as a Blob.

In the project's published benchmarks, measured on 2026-11-16 on an Apple Silicon Mac, a 1 MB ZIP holding 1 GB of zeros (a ratio near 1,000:1) took 5.3 seconds to verify in the engine with about 16 MB of peak memory growth, and 3.4 seconds through the Chrome interface. Before the output cap was introduced, verifying 256 MB of zeros peaked at roughly 513 MB of memory. Those are measurements on one machine, not a guarantee for every device.

Nested archives are separately bounded: unzipping archives inside archives limits depth, accepts at most 5,000 archives and keeps about 1 GB in memory. The limit is deliberate, so a bomb fails safely instead of hanging the page.

If you already extracted one

  • Close the tool and delete the extracted files. The original ZIP is untouched and can be removed too.
  • Check available disk space. A bomb may have filled the drive before the tool stopped it.
  • On a work machine, tell your IT or security team; they may want the original file for investigation.
  • If files were opened or executed, treat it as a security incident and run a full antivirus scan.
  • Reject the sender or download source rather than trying the same archive again with a different tool.

To confirm whether an archive is merely large or actually damaged, run Test ZIP Integrity. It verifies each entry and reports corruption, which a bomb is not.

Responsible handling

ZIP bombs are not a trick to play on colleagues: they are denial-of-service payloads. Build them only in a controlled security lab with synthetic data, and never send one to someone who has not agreed to receive it. For defenders, the useful habit is to inspect the index first, keep extractors patched and avoid automatically unpacking archives from untrusted senders. A practical security checklist for IT teams covers the wider policy.

A short history of the ZIP bomb

The classic example appeared in the late 1990s: a file of a few kilobytes that expanded to gigabytes of zeros. Antivirus products of the time could spend minutes trying to scan it, which gave the attack its name. The trick was not clever code, just the fact that a long run of identical bytes compresses to almost nothing while expanding to an enormous output.

Later variants multiplied the effect. A famous family of files, sometimes called 42.zip, nested several layers of archives inside one another so that a tiny download could theoretically expand to petabytes if every layer were unpacked in turn. Others used overlapping entries, where many file records point at the same compressed bytes, so the decompressor does the same work repeatedly and writes many copies.

  • Ratio bombs rely on a single extremely compressible stream. A reader that checks the declared uncompressed size before extracting can reject them.
  • Nested bombs rely on a reader that unpacks recursively without a depth limit. Each layer multiplies the data.
  • Overlap bombs exploit readers that trust offsets without checking for entries sharing the same storage.
  • Disk-filling bombs do not need extreme ratios at all; a few gigabytes of ordinary data can be enough on a full drive.

Defences have improved since those examples. Modern archive tools cap output per decompression step, inspect declared sizes before writing and bound recursive extraction. Aback ZIP follows that approach: it warns on extreme inputs, decompresses in limited steps and does not unpack nested archives without limits. None of this turns an untrusted archive into a trusted one, so the first defence is still to know who sent it.

A bomb that expands to a large but ordinary-looking size is harder to spot by ratio alone. Entry count, nesting depth and total uncompressed size have to be considered together.

Tools for this

Frequently asked questions

Listing the contents does not extract anything. A bomb does damage when a program decompresses or writes all of it. Avoid automatic extraction of untrusted archives.

More guides