Skip to content

RUSTSEC-2026-0391: Data from an abandoned stream leaks into the next stream on a reused context #28

Closed

Description

@github-actions

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

Details
Package zstd
Version 0.13.3
URL gyscos/zstd-rs@74ace2d
Date 2026-10-16
Patched versions >=0.14.3
Unaffected versions <0.13.2

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.

See advisory page for additional details.

Activity

  1. adwk67 commented on Oct 27, 2026

    @adwk67
    Member

    fixed by #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions