The vulnerability is an uncontrolled memory allocation (CWE-789/CWE-400) in the optional legacy-zip decoders of the Rust zip crate. When the legacy Shrink/Reduce/Implode codecs are enabled, each decoder uses the entry's declared uncompressed size from ZIP metadata (attacker-controlled for ZIP64 entries) as a direct argument to Vec::reserve. Because this reservation happens before any compressed-stream validation or decoding, an entry declaring u64::MAX causes Rust's allocation code to panic with capacity overflow in both debug and optimized builds, terminating the process (denial of service) via ZipArchive::extract().
The fix commit 8b4991288b79ad11cce201c2d785d5baa795bd3e (PR #991) modified exactly five reserve sites and added MAX_PREALLOC to cap speculative allocation. The five modified sites correspond to five vulnerable functions present in the vulnerable version (8.6.0): the read methods of ShrinkDecoder and ImplodeDecoder (which process attacker input and trigger the panic), and the decode helpers hwunshrink (Shrink), hwexpand (Reduce), and hwexplode (Implode), which each also contained an unbounded reserve on the attacker-controlled size. The MAX_PREALLOC constant and the .min(...) clamping introduced by the patch are mitigations, not vulnerable functions, so they are excluded. Function names are given as Rust module paths, matching demangled profiler/backtrace output for the crate.