RUSTSEC-2026-0391

Source
https://rustsec.org/advisories/RUSTSEC-2026-0391
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0391.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0391
Published
2026-10-16T12:00:00Z
Modified
2026-10-26T14:00:04Z
Summary
Data from an abandoned stream leaks into the next stream on a reused context
Details

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.

Database specific
{
    "license":  "CC0-1.0"
}
References

Affected packages

crates.io / zstd

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.13.2
Fixed
0.14.3

Ecosystem specific

{
    "affected_functions":  null,
    "affects":  {
        "arch":  [],
        "functions":  [
            "zstd::stream::raw::Decoder::with_context",
            "zstd::stream::raw::Encoder::with_context"
        ],
        "os":  []
    }
}

Database specific

categories
[
    "memory-exposure"
]
cvss
null
informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0391.json"