RUSTSEC-2026-0402 json
Heap buffer overflow in `CCtx::try_clone` on a multithreaded context
published 26d ago modified 10d ago
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
`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.
Patch / fix
- crates.io zstd-safe 7.4.0, 8.2.0
- github.com/gyscos/zstd-rs@682b8b2 commit
- github.com/gyscos/zstd-rs#384 pull request
Is RUSTSEC-2026-0402 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | zstd-safe | >=4.1.4, <7.4.0 >=8.0.0-0, <8.2.0 |
7.4.0 8.2.0 |
References
Sources
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.