Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

`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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-29787
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 18:20 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 17 Mar 2025, 13:19 UTC

`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.

osv:CVE-2025-29787
Complete source record
{
  "id": "6d7977d86451148cf48e170ee7a91643094f0b5a660be9e47d7d22d8bd5add73",
  "url": "https://osv.dev/vulnerability/CVE-2025-29787",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "zip Vulnerable to Incorrect Path Canonicalization During Archive Extraction, Leading to Arbitrary File Write",
    "summary": "`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.",
    "evidence": "osv:CVE-2025-29787",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-29787",
      "aliases": [
        "CVE-2025-29787",
        "GHSA-94vh-gphv-8pm8",
        "RUSTSEC-2025-0168"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS: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": [
        {
          "ranges": [
            {
              "repo": "https://github.com/zip-rs/zip2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "102e31113daa5e9553db14c985b1db3f519174a8"
                },
                {
                  "fixed": "6eab5f5cc64cf051f2712428745ca2fea088097c"
                },
                {
                  "fixed": "a2e062f37066c3b12860a32eb1cb44856cfb7afe"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.3.0"
                      },
                      {
                        "fixed": "2.3.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a2e062f37066c3b12860a32eb1cb44856cfb7afe"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "6eab5f5cc64cf051f2712428745ca2fea088097c"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.3.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "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"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-29787.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.167620120Z",
      "provider": "osv",
      "references": [
        "https://gist.github.com/eternal-flame-AD/bf71ef4f6828e741eb12ce7fd47b7b85",
        "https://github.com/zip-rs/zip2/releases/tag/v2.3.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/29xxx/CVE-2025-29787.json",
        "https://github.com/zip-rs/zip2/security/advisories/GHSA-94vh-gphv-8pm8",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-29787",
        "https://github.com/zip-rs/zip2/commit/a2e062f37066c3b12860a32eb1cb44856cfb7afe"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-180",
          "CWE-22",
          "CWE-61"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/29xxx/CVE-2025-29787.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-29787",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505657,
  "published_at": "2025-03-17T13:19:23.925+00:00"
}