RUSTSEC-2026-0402

published 16 Oct 2026 · updated 2 Nov 2026

Heap buffer overflow in `CCtx::try_clone` on a multithreaded context

5.0Medium

No exploitation in the wild has been reported. Fixed in zstd-safe 8.2.0.

`CCtx::try_clone` (`experimental` feature, deprecated) copies tables sized from the context's applied parameters. Starting a multithreaded frame (`zstdmt` feature) replaces those parameters with the workers' without resizing the context's own tables, so after an abandoned single-threaded frame, the copy wrote up to 512 KiB past a heap allocation, or read past one. This became reachable with the bundled zstd 1.5.6. The flaw was corrected by refusing `try_clone` (and the unsafe `compress_block`) once `NbWorkers` was set on the context.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
cargo: zstd-safe>=8.0.0-0 <8.2.08.2.0

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in zstd-safe (Cargo), strongest first

Embed

A live severity badge for an advisory, README or ticket

RUSTSEC-2026-0402 severity on Zeptric[![RUSTSEC-2026-0402](https://zeptric.io/badge/cve/RUSTSEC-2026-0402.svg)](https://zeptric.io/cve/RUSTSEC-2026-0402)