Vulnerability advisory

CVE-2025-29787

zip Vulnerable to Incorrect Path Canonicalization During Archive Extraction, Leading to Arbitrary File Write

Published Updated OSV record ↗

Also known as GHSA-94vh-gphv-8pm8RUSTSEC-2025-0168

Severity
  • CVSS 4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:H/SI:H/SA:H

Affected versions

Repository

Affected commitsFixed by commit
GIT github.com/zip-rs/zip2 ↗
102e31113daa5e9553db14c985b1db3f519174a8 to before 6eab5f5cc64cf051f2712428745ca2fea088097c6eab5f5cc64cf051f2712428745ca2fea088097c
Not specifieda2e062f37066c3b12860a32eb1cb44856cfb7afe
Also listed as affected (14)
  • v2.2.3
  • v2.2.2
  • v2.2.1
  • v2.2.0
  • v2.1.6
  • v2.1.5
  • v2.1.4
  • v2.1.3
  • v2.1.2
  • v2.1.1
  • v2.1.0
  • v2.0.0
  • v1.3.1
  • v1.3.0

Description

zip is a zip library for rust which supports reading and writing of simple ZIP files. In the archive extraction routine of affected versions of the zip crate starting with version 1.3.0 and prior to version 2.3.0, 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. Users 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. Version 2.3.0 fixes the issue.

References

  • Codex
  • Claude Code
  • VS Code
  • GitHub Copilot
  • Cursor
  • Cline
  • Windsurf
  • Google Anti-gravity
  • OpenCode
  • Pi
  • Gemini CLI
  • Hermes Agent
  • Zed
  • Junie
  • Qwen Code
  • Kiro
  • Kilo Code
  • Factory Droid

Set up GitHits for your agents

Run this command:

<> bash
npx githits@latest init

What happens next:

  1. Opens your browser to authorize GitHits
  2. Asks whether to set up GitHits at the user or project level
  3. Detects your supported AI coding tools
  4. Lets you choose which tools to configure
  5. Configures the selected tools