ZIP is one of the oldest and most widespread file formats in the world — nearly every compressed archive on your computer, as well as Office documents, Android APKs, and Java JAR files, uses ZIP as its container. But a paper at USENIX Security 2025 found that the ZIP format specification itself contains numerous ambiguities, causing ZIP parsers written in different programming languages to interpret the same file in different ways.
The researchers developed a differential fuzzer called ZipDiff and systematically tested 50 ZIP parsers covering 19 programming languages. The result: nearly every pair of parsers exhibits some parsing ambiguity. They categorized 14 types of parsing ambiguities (10 of which are newly discovered).
The severity lies here — when a single ZIP file is interpreted by two different parsers as two different contents, an attacker gains a semantic gap. For example:
- Bypassing secure email gateways: an email attachment is seen as "safe" by the gateway's ZIP parser, but the user's mail client extracts different, malicious content.
- Spoofing VS Code extension signature verification: the extension package appears to pass the signature check, but actually loads unsigned malicious code.
- Tampering with signed JAR files: Spring Boot's signature verification passes, but the code actually executed has been altered.
*Core insight*: when multiple parties each implement their own version from the same "specification," every ambiguity in that specification is a potential security vulnerability.
Reference: [My ZIP isn't your ZIP / USENIX Security 2025]