Use-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 (). The flaw was corrected by taking `&'a CDict<'b>` and `&'a DDict<'b>`.
- Products
- zstd-safe
- Affected versions
- Not specified
- Fixed versions
- 8.2.0
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 14:47 UTC · Revision 1
Source evidence
Use-after-free through `init_using_cdict` and `init_using_ddict`
core-osv · Original sourcePublished 16 Oct 2026, 12:00 UTC
`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 (). The flaw was corrected by taking `&'a CDict<'b>` and `&'a DDict<'b>`.
osv:RUSTSEC-2026-0399
zstd-safe
Fixed versions: 8.2.0
Complete source record
{
"id": "9fef0596ee2f8e6643a6f86560e199efd404902ca675121b779f4342d71d200e",
"url": "https://osv.dev/vulnerability/RUSTSEC-2026-0399",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Use-after-free through `init_using_cdict` and `init_using_ddict`",
"summary": "`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 (). The flaw was corrected by taking `&'a CDict<'b>` and `&'a DDict<'b>`.",
"evidence": "osv:RUSTSEC-2026-0399",
"products": [
{
"name": {
"value": "zstd-safe",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "8.2.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "RUSTSEC-2026-0399",
"aliases": [
"RUSTSEC-2026-0399"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "8.2.0"
}
]
}
],
"package": {
"name": "zstd-safe",
"purl": "pkg:cargo/zstd-safe",
"ecosystem": "crates.io"
},
"database_specific": {
"cvss": null,
"source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0399.json",
"categories": [
"memory-corruption"
],
"informational": "unsound"
},
"ecosystem_specific": {
"affects": {
"os": [],
"arch": [],
"functions": [
"zstd_safe::CCtx::init_using_cdict",
"zstd_safe::DCtx::init_using_ddict"
]
},
"affected_functions": null
}
}
],
"modified": "2026-10-26T14:00:05.792431051Z",
"provider": "osv",
"references": [
"https://crates.io/crates/zstd-safe",
"https://rustsec.org/advisories/RUSTSEC-2026-0399.html",
"https://github.com/gyscos/zstd-rs/commit/e00e7928e3e98953fc43418af6d73f6aae2378fb",
"https://github.com/gyscos/zstd-rs/pull/384"
],
"provider_metadata": {
"license": "CC0-1.0"
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 454202,
"published_at": "2026-10-16T12:00:00+00:00"
}