{"id":"RUSTSEC-2026-0399","aliases":["RUSTSEC-2026-0399"],"related":[],"kind":"vulnerability","state":"published","title":"Use-after-free through `init_using_cdict` and `init_using_ddict`","summary":"`CCtx::init_using_cdict` and `DCtx::init_using_ddict` (`experimental`\nfeature, deprecated) took the dictionary as `&CDict<'b>` and `&DDict<'b>`\nwith only `'b: 'a`, so the dictionary itself could be dropped while the\ncontext still pointed at it. The same mistake in other constructors was\nfixed earlier (<https://github.com/gyscos/zstd-rs/issues/365>).\n\nThe flaw was corrected by taking `&'a CDict<'b>` and `&'a DDict<'b>`.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"`CCtx::init_using_cdict` and `DCtx::init_using_ddict` (`experimental`\nfeature, deprecated) took the dictionary as `&CDict<'b>` and `&DDict<'b>`\nwith only `'b: 'a`, so the dictionary itself could be dropped while the\ncontext still pointed at it. The same mistake in other constructors was\nfixed earlier (<https://github.com/gyscos/zstd-rs/issues/365>).\n\nThe flaw was corrected by taking `&'a CDict<'b>` and `&'a DDict<'b>`.","format":"markdown","source":"rustsec"}],"published":"2026-10-16T12:00:00.000Z","modified":"2026-11-02T09:30:03.328Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"7.4.0"},{"type":"semver","introduced":"8.0.0-0","status":"affected","fixed":"8.2.0"}],"ecosystem":"crates.io","package":"zstd-safe","purl":"pkg:cargo/zstd-safe","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/zstd-safe","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0399.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/gyscos/zstd-rs/commit/e00e7928e3e98953fc43418af6d73f6aae2378fb","tags":["web"],"sources":["rustsec"]},{"url":"https://github.com/gyscos/zstd-rs/pull/384","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0399","url":"https://rustsec.org/advisories/RUSTSEC-2026-0399.html","licence":"CC0-1.0","modified":"2026-11-02T09:30:03.328Z"}],"updatedAt":"2026-11-25T22:56:43.451Z"}