{"ecosystem":"cargo","package":"zip","version":null,"bugs":[{"id":934,"ecosystem":"cargo","package_name":"zip","affected_version":"1.3.0","fixed_version":"2.3.0","bug_id":"osv:GHSA-94vh-gphv-8pm8","title":"zip Incorrectly Canonicalizes Paths during Archive Extraction Leading to Arbitrary File Write","description":"### Summary\n\n\nIn the archive extraction routine of affected versions of the `zip` crate, symbolic links earlier in the archive are allowed to be used for later files in the archive without validation of the final canonicalized path, allowing maliciously crafted archives to overwrite arbitrary files in the file system when extracted.\n\n### Details\n\nThis is a variant of the [zip-slip](https://github.com/snyk/zip-slip-vulnerability) vulnerability, we can make the extraction logic step outside of the target directory by creating a symlink to the parent directory and then extracting further files through that symlink.\n\nThe documentation of the [`::zip::read::ZipArchive::extract`] method is in my opinion implying this should not happen:\n\n> \"Paths are sanitized with ZipFile::enclosed_name.\" ...\n> [`::zip::read::FileOptions::enclosed_name`] ... is resistant to path-based exploits ... can’t resolve to a path outside the current directory.\n\n\nMost archive software either decline to extract symlinks that traverse out of the directory or defer creation of symlinks after all files have been created to prevent unexpected behavior when later entries depend on earlier symbolic link entries.\n\n### PoC\n\nhttps://gist.github.com/eternal-flame-AD/bf71ef4f6828e741eb12ce7fd47b7b85\n\n### Impact\n\nUsers who extract untrusted archive files using the following high-level API method may be affected and critical files on the system may be overwritten with arbitrary file permissions, which can potentially lead to code execution.\n\n- zip::unstable::stream::ZipStreamReader::extract\n- zip::read::ZipArchive::extract","severity":"high","status":"fixed","source":"osv","source_url":"https://github.com/zip-rs/zip2/security/advisories/GHSA-94vh-gphv-8pm8","labels":["CVE-2025-29787"],"created_at":"2026-04-19 04:32:16.197493+00:00","updated_at":"2026-04-19 04:32:16.197493+00:00"}],"total":1,"_cache":"hit"}