RUSTSEC-2026-0391 json
Data from an abandoned stream leaks into the next stream on a reused 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
The `with_context` constructors of the stream encoders and decoders used the borrowed context as it was. When a stream was abandoned on a context, for example an encoder dropped before `finish()` after an error, whatever it left there was carried into the next stream: the input buffered by the previous encoder (up to 128 KiB, or all of it with `zstdmt`) became the start of the next frame, and a decoder returned undelivered output of the previous stream.
An application reusing one context for data that must stay separate, such as different users' requests, could disclose one user's plaintext to another. Whoever supplies the data can cause the abandonment with invalid input.
The flaw was corrected by resetting the context's session in `with_context`.
Patch / fix
- crates.io zstd 0.13.4, 0.14.3
- github.com/gyscos/zstd-rs@74ace2d commit
- github.com/gyscos/zstd-rs#384 pull request
Is RUSTSEC-2026-0391 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 | >=0.13.2, <0.13.4 >=0.14.0-0, <0.14.3 |
0.13.4 0.14.3 |
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.