Archive and ZIP Security Pack

Extract this one somewhere you do not mind losing. Two of the archives inside are built specifically to write outside the directory you extract them into, which is the whole point: if your extractor lets them, you want to find out here rather than in production.

↓ Download archive-security-pack.zip13 files · 11.8 KB zipped

SHA-256 6a8abb8745b41e060a83b153754301ed4508038166b881028c37b64bdbe6ab23

What is inside

FileFormatSizeExpected result
valid-flat.zipZIP376 bytesThe control. Extracts cleanly.
valid-nested-dirs.zipZIP390 bytesDirectory structure recreated correctly.
zip-slip-traversal.zipZIP357 bytesEntry refused. Nothing written outside the target directory.
absolute-path.zipZIP161 bytesLeading separator stripped or the entry refused outright.
nested-10-deep.zipZIP1.2 KBRecursive extraction bounded by depth, if you recurse at all.
modest-zip-bomb.zipZIP996 KBAborted once the decompressed total passes your limit.
unicode-entry-names.zipZIP563 bytesEntry names decoded as UTF-8, not the system code page.
corrupt-central-directory.zipZIP219 bytesRejected, or recovered by scanning local headers. Either is defensible; silently producing nothing is not.
empty.zipZIP22 bytesRecognised as a valid archive containing no entries.
valid.tarTAR4.0 KBHandled despite the ustar magic sitting 257 bytes in.
valid.tar.gzTAR+GZIP188 bytesDouble extension handled without stopping at .gz.
single-file.gzGZIP146 bytesPlain gzip stream, no tar inside.
stored.7z7z303 bytesA format whose metadata sits after the payload, so a truncated copy loses the file list.
Also in the archive: a README.md repeating this table with full digests, a manifest.json for scripting, and a SHA256SUMS you can check with sha256sum -c. Every file is generated from source, carries no third-party copyright, and is free to redistribute.

Questions

What is Zip Slip?

A path traversal attack where an archive entry is named something like ../../etc/cron.d/task, so a naive extractor writes outside the directory you chose. It needs no exploit, only an extractor that joins paths without checking the result. The pack contains one.

Is the zip bomb in this pack dangerous?

No. It is deliberately modest: it expands enough to prove your decompression limit works and nowhere near enough to fill a disk. A real zip bomb is not something anyone should be handing out.

How should an extractor defend itself?

Resolve every entry path against the destination and confirm the result is still inside it after following symlinks. Limit total decompressed bytes and entry count, and abort as soon as either is exceeded. Never trust the sizes declared in the archive header.

Other packs

Upload Torture Test Pack · Filename Compatibility Pack · Encoding and Unicode Pack · Document Parser Pack · Image Pipeline Pack · Structured Data Pack · Email Parser Pack