RUSTSEC-2026-0399
not scored yetUse-after-free through `init_using_cdict` and `init_using_ddict`
CCtx::init_using_cdict and DCtx::init_using_ddict (experimental
feature, deprecated) took the dictionary as &CDict<'b> and &DDict<'b>
with only 'b: 'a, so the dictionary itself could be dropped while the
context still pointed at it. The same mistake in other constructors was
fixed earlier (https://github.com/gyscos/zstd-rs/issues/365).
The flaw was corrected by taking &'a CDict<'b> and &'a DDict<'b>.
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | zstd-safe | >= 3.0.0, < 7.4.0; >= 8.0.0-0, < 8.2.0 | 7.4.0, 8.2.0 |
References
- https://crates.io/crates/zstd-safe · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0399.html · ADVISORY
- https://github.com/gyscos/zstd-rs/commit/e00e7928e3e98953fc43418af6d73f6aae2378fb · WEB
- https://github.com/gyscos/zstd-rs/pull/384 · WEB
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Oct 2026)