---
id: "CVE-2026-115907"
kind: "vulnerability"
aliases: ["CVE-2026-115907"]
title: "zip (Rust): crafted ZIP64 size makes extraction panic and crash"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cargo", "package", "rust", "zip"]
not_affected_if: ["legacy-zip-disabled", "trusted-archives-only"]
published_at: "2026-10-26T17:17:18+00:00"
first_seen_at: "2026-10-26T17:31:22+00:00"
updated_at: "2026-10-26T17:33:07+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115907", "first_seen_at": "2026-10-26T17:31:22+00:00"}]
---

# zip (Rust): crafted ZIP64 size makes extraction panic and crash

The zip Rust crate, when built with the legacy-zip feature, reserves output memory from an attacker-supplied ZIP64 uncompressed size before checking the compressed data. A crafted archive makes ZipArchive::extract panic with a capacity overflow, which can terminate a service that processes archives.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the project depends on `zip` in Cargo.toml or Cargo.lock and note the version, for example `cargo tree -i zip`.
- Check whether the `legacy-zip` feature is enabled on the `zip` dependency.
- Check whether the application calls `ZipArchive::extract` on archives from untrusted sources.

## Fix

- Upgrade the `zip` crate to `9.0.0` or later.
- Rebuild and redeploy services that extract untrusted archives.

## Timeline

- 2026-10-26T17:31:22+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115907

## From the sources

zip is a zip library for Rust that supports reading and writing simple ZIP files. From 5.1.0 until 9.0.0, applications built with the legacy-zip feature can reserve output capacity from an attacker-controlled ZIP64 uncompressed size before validating the compressed stream. The ShrinkDecoder path in src/legacy/shrink.rs can panic with a capacity overflow during ZipArchive::extract, and the Reduce and Implode decoders contain the same unbounded preallocation pattern. An unhandled panic can terminate an archive-processing service. This issue is fixed in version 9.0.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
