Data from an abandoned stream leaks into the next stream on a reused context
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 0.14.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The zstd compression library's stream encoders and decoders, when constructed with a reused context, can carry leftover data from an abandoned stream into the next one. An application that reuses one context for separate users' data could therefore expose one user's plaintext to another.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
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`.
Timeline
- Advisory published
- Record last updated
Affected versions
- zstdcrates.io
From 0.13.2 · fixed in 0.14.3