Every CVE Search/ Get API key

RUSTSEC-2026-0391

Data from an abandoned stream leaks into the next stream on a reused context

No scoreFix available

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.

What each source reports

OSV No score

Data from an abandoned stream leaks into the next stream on a reused context

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.

Record
RUSTSEC-2026-0391
Updated
2026-11-02

Affected packages

Affected packages
PackageAffectedFixed
zstd
crates.io
0.13.2 up to 0.13.4, 0.14.0-0 up to 0.14.3
0.13.40.14.3

History

History
RecordedChangedSources
first indexedOSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

RUSTSEC-2026-0391 is a vulnerability with no CVSS score yet in zstd, published October 16, 2026. No source lists public exploit code. Fixed in zstd 0.13.4.

References

MoveEnter Open