Treat every incoming archive as untrusted input, including one from a known contact. The useful checklist is short: inspect metadata before extraction, control where paths can write, bound decompression, separate encryption from verification, and keep a record of what you checked.
Why archives deserve their own policy
An archive is a container that can carry hundreds of files, nested archives and metadata written by someone else. Extracting it is not the same as opening a document: it can create many files at once, place them in paths chosen by the sender and consume large amounts of memory. A policy that covers email attachments but stops there misses the container layer.
The first rule is to inspect before extracting. ZIP Viewer reads the archive index only, so you can see names, sizes, compression methods and flags without unpacking anything. That single habit catches most obvious problems.
Path traversal and Zip Slip
Entry names are untrusted strings. A name such as ../../../../etc/cron.d/job is an instruction to write outside the intended folder if a tool resolves it naively. This class of bug is known as Zip Slip and is a form of path traversal, tracked broadly as CWE-22.
- Reject or sanitise absolute paths, drive-letter paths, UNC paths and any name containing
..segments. - Normalise separators: both slash and backslash have appeared in real archives.
- Resolve the final path and confirm it is inside the destination directory before writing.
- Treat symlinks and hard links as separate findings; they can point outside the extraction root even when the entry name looks safe.
- Never extract directly into a directory that contains files you care about.
Aback ZIP's ZIP Safety Check flags path traversal and link patterns from the archive index. It is a screening tool, not a substitute for safe extraction code or an antivirus product.
Zip bombs and resource limits
A small archive can expand into an impractical amount of data. The warning sign is a high ratio of uncompressed to compressed size. A few kilobytes of carefully chosen input can expand into gigabytes of output and exhaust memory or disk.
| Signal | Why it matters | Suggested response |
|---|---|---|
| Total uncompressed size | Sets the memory and disk requirement | Warn or block when it exceeds a policy threshold |
| Compression ratio | High ratios are typical of bombs | Flag extreme ratios for review |
| Entry count | Hundreds of thousands of entries can overwhelm a tool | Use an index-only viewer; avoid bulk extraction |
| Individual entry size | One large entry can dominate resources | Check before selecting that entry |
| Nested archives | Recursive unpacking multiplies the risk | Set a depth and count limit |
Ratio checks must handle a compressed size of zero without dividing by zero. Aback ZIP's decoders work in bounded steps, so a highly compressible stream is decompressed in chunks rather than allocated in one block; the project's benchmark notes describe the approach. The ZIP bomb explainer covers the threat in more detail.
A ratio check is a heuristic. Legitimate archives of logs or synthetic data can be highly compressible. Use it to trigger review, not as a perfect classifier.
Content that is not what it claims
Archive entries can be renamed to look harmless. A double extension such as invoice.pdf.exe, a macro-enabled Office document, a script or a disk image deserves attention. Windows may hide known extensions by default, which makes the disguise more effective.
- Compare the entry name with what the bytes actually are, when your tooling can do that.
- Flag executable extensions, script files, macro-enabled documents and archive-inside-archive patterns.
- Treat HTML and SVG entries as untrusted content; do not render them inside your application's origin.
- Do not execute anything straight from an extracted folder as part of an automated workflow.
- Keep the original archive for forensics if you find something suspicious.
For guidance on attachments specifically, see ZIP attachments and email security. The guide on deciding whether a ZIP is safe explains what an index-only check can and cannot tell you.
Encryption, passwords and key handling
Password-protected archives are common in legitimate business, and common in malware delivery too. Encryption is not a safety signal. It also prevents many inspection tools from seeing what is inside until a password is supplied.
- Require that passwords arrive by a separate channel and are never stored in the same ticket as the archive.
- Prefer WinZip AES over legacy ZipCrypto; the AES explainer sets out why.
- Never paste an unknown archive's password into a site you have not verified; use a local tool when the password is sensitive.
- Remember that Aback ZIP can remove a password you know but does not crack unknown passwords.
Integrity: CRC is not authenticity
ZIP stores a CRC-32 for each entry. Recomputing it after decompression detects corruption from a truncated download or a failing disk. It does not prove that a sender is who they claim to be, and a party that can modify the archive can recompute the CRC.
For authenticity, use a cryptographic hash or signature delivered over a separate trusted channel. ZIP Checksum produces SHA-256 values for the archive and its entries locally. Test ZIP Integrity verifies CRCs and reports structural problems in plain language. Run both: they answer different questions.
A failed CRC means the data changed somewhere. It does not tell you where or why. Keep the original file and retry the transfer before assuming tampering.
Policy for browser-based archive tools
Browser tools are useful for triage because they can inspect an archive before anything is extracted. A policy should still state which sites are approved and what data may be opened there. The upload privacy analysis explains how to check whether a page processes files locally.
| Policy item | What to require |
|---|---|
| Data flow | No upload of file contents, names or hashes for the tools you approve |
| Third parties | No ad or analytics script that can observe file-picker activity |
| Processing location | Local Web Worker or equivalent; document any exception |
| Claims | Privacy statements limited to tested behaviour; no untested offline promises |
| Fallback | If a tool cannot handle a format, report that rather than sending the file elsewhere |
Aback ZIP is a static site whose tools process files locally in the browser. Automated browser tests cover Chrome on macOS only; Safari, Firefox, Edge and mobile browsers have not been tested. Treat browser compatibility as a separate question from the privacy model.
A short runbook for an incoming archive
- Record where the archive came from and keep the original unchanged.
- Inspect the index: names, counts, sizes, compression methods, flags and encryption status.
- Check for path traversal, links, executables, macros and nested archives.
- Review total uncompressed size and ratio against your limits.
- Verify the supplied hash or signature if one exists; run a CRC test separately.
- Extract only the entries you need into a clean directory.
- Scan extracted files with your endpoint tooling before anyone opens them.
- Log the result and retain the archive according to your policy.
This runbook is deliberately conservative. Most archives are benign, but the cost of applying a short checklist is small compared with the cost of an incident. The checklist works the same whether you use desktop software or Extract ZIP in a browser.