The vulnerability is a classic Zip Slip issue within the @appium/support package, allowing an attacker to write arbitrary files by crafting a malicious ZIP archive with path traversal sequences (../). The root cause is twofold:
-
In the primary extraction workflow initiated by extractAllTo, the ZipExtractor.extract method had a path traversal check that was rendered non-functional because it created an Error object without throwing it. This allowed the extraction to proceed even when a malicious path was detected.
-
A secondary function, _extractEntryTo (used by readEntries), lacked any path traversal validation whatsoever, creating another vector for the same vulnerability.
The vulnerable call chain starts with the user calling extractAllTo. This function instantiates ZipExtractor and calls its extract method. Inside extract, the defective check fails, and it proceeds to call extractEntry, which acts as the sink, writing the file to the malicious path. The patches in version 7.0.6 fixed both issues by adding the missing throw in ZipExtractor.extract and implementing a proper path validation check in _extractEntryTo.