{"id":"RUSTSEC-2026-0547","summary":"Legacy Shrink, Reduce and Implode decoders preallocate the declared uncompressed size","details":"With the `legacy-zip` feature, the decoders for the Shrink, Reduce and Implode compression methods reserved output capacity for the entry's declared uncompressed size before decoding anything. That size comes from the archive, and a ZIP64 entry can declare any 64-bit value, so reading or extracting a crafted entry of a few bytes panics with \"capacity overflow\" or fails a huge allocation.\n\nAn attacker who can supply an archive can stop a process that reads it, for example through `ZipArchive::extract`.\n\nOnly builds with the `legacy-zip` feature are affected; it is not enabled by default.\n\nThe fix caps the preallocation at 1 MiB, and such an entry now returns an error.","aliases":["CVE-2026-115907","GHSA-9hj8-73fh-9963"],"modified":"2026-11-17T10:15:03.059525735Z","published":"2026-10-22T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/zip"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0547.html"},{"type":"WEB","url":"https://github.com/zip-rs/zip2/pull/991"}],"affected":[{"package":{"name":"zip","ecosystem":"crates.io","purl":"pkg:cargo/zip"},"ranges":[{"type":"SEMVER","events":[{"introduced":"5.1.0"},{"fixed":"9.0.0"}]}],"ecosystem_specific":{"affects":{"arch":[],"os":[],"functions":[]},"affected_functions":null},"database_specific":{"categories":["denial-of-service"],"cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0547.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}