Security researcher crafts tar file that extracts differently across 8 tools
A researcher built a single tar archive using GNU tar's pax format options that produces eight distinct results when unpacked, depending on which extraction tool is used. The trick exploits ambiguity in the POSIX specification over whether a hard-linked file entry in a pax archive can carry its own data size, letting the archive contain a crafted 512-byte size field equal to a tar header's length. Tools including GNU tar, BusyBox, Python, Go and Perl ignore this size and extract the files identically, while Apple's bsdtar instead writes those 512 bytes into the hard-linked file, altering its contents.
GoKawiil's interpretation of the reporting above, not reported fact.
The demonstration suggests that inconsistent interpretations of the pax tar format across widely used libraries and utilities could let specially crafted archives produce different files or contents depending on the extracting tool, which could be exploited to hide or smuggle data. It highlights a gap in the POSIX specification's wording around hard links and file size in pax archives that implementers have resolved in conflicting ways. Such divergence could matter for security tooling, software packaging, or archive verification systems that assume consistent extraction behavior.
- A single crafted tar archive extracts into eight different results depending on the tool used.
- The ambiguity stems from unclear POSIX wording on whether hard links can have a data size in pax archives.
- GNU tar, BusyBox, Python, Go and Perl behave similarly, while Apple's bsdtar diverges, writing header bytes into a hard-linked file.
Source: stoppels.ch, 2026-11-10
Published there as: “The Hardest Tarball?”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.