ZIP cloaking shows why scanners and extractors need the same parser
A ZIP file can carry two different names for the same entry. The local file header sits next to the compressed data. The central directory sits at the end of the archive and normally provides the index used when a program opens a specific file. If two parsers disagree about which name is authoritative, a security scanner and an extractor can inspect different objects.
The Rust zip crate handled that disagreement in different ways before version 9.0.5. ZipArchive , the random-access reader, treats the central directory file header as authoritative and ignores the local name. ZipStreamReader extracts sequentially and relies on the local file header.…