{"id":"RUSTSEC-2026-0402","aliases":[],"title":"Heap buffer overflow in `CCtx::try_clone` on a multithreaded context","titleSource":"OSV","descriptionSource":"OSV","description":"`CCtx::try_clone` (`experimental` feature, deprecated) copies tables sized\nfrom the context's applied parameters. Starting a multithreaded frame\n(`zstdmt` feature) replaces those parameters with the workers' without\nresizing the context's own tables, so after an abandoned single-threaded\nframe, the copy wrote up to 512 KiB past a heap allocation, or read past\none. This became reachable with the bundled zstd 1.5.6.\n\nThe flaw was corrected by refusing `try_clone` (and the unsafe\n`compress_block`) once `NbWorkers` was set on the context.","severity":"unknown","score":null,"published":"2026-10-16T12:00:00.000Z","modified":"2026-11-02T09:30:04.162Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"crates.io","name":"zstd-safe","sources":[{"name":"OSV · RUSTSEC-2026-0402","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0402"}],"ranges":[{"events":[{"introduced":"4.1.4"},{"fixed":"7.4.0"},{"introduced":"8.0.0-0"},{"fixed":"8.2.0"}],"type":"SEMVER"}],"versions":[],"fixed":["7.4.0","8.2.0"]}],"sourceAffected":[],"references":["https://crates.io/crates/zstd-safe","https://rustsec.org/advisories/RUSTSEC-2026-0402.html","https://github.com/gyscos/zstd-rs/commit/682b8b2967cf4aba5cfe2d940d1e381a3e23211a","https://github.com/gyscos/zstd-rs/pull/384"],"sources":[{"name":"OSV","id":"RUSTSEC-2026-0402","modified":"2026-11-02T09:30:04.162155944Z","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0402"}],"assessments":[],"products":[],"remediation":[],"observedAt":"2026-11-02T09:40:42.326Z","kev":{"status":"unavailable","checkedAt":"2026-11-29T01:30:31.339Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[],"aiSummary":null}