Post

tar-codec: a fast and secure tar parser for the Rust ecosystem

Astral’s new Rust tar parser is now used by uv 0.13 to read source distributions. The project says it is roughly twice as fast as its previous parser and, more importantly, rejects ambiguous archive encodings that could make different tools see different contents in the same tarball. The detailed write-up explains how legacy tar variants and extensions create those parser differentials; it also distinguishes parser ambiguity from the separate risks of extracting archive paths onto disk.

Lobsters readers praised the format diagrams and discussed how archive extraction can still create path-traversal hazards even when parsing is consistent. Astral points to archive-trait and cap-std for that separate extraction layer.