RUSTSEC-2026-0397

published 16 Oct 2026 · updated 2 Nov 2026

`OutBuffer::around_pos` exposes uninitialized memory

5.0Medium

No exploitation in the wild has been reported. Fixed in zstd-safe 8.2.0.

`OutBuffer::around_pos` accepted a position past the initialized length of a `Vec<u8>`. The next streaming call then marked everything before the position as initialized, so safe code could read stale heap memory between the vector's previous length and that position. The flaw was corrected by zero-filling that gap.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
cargo: zstd-safe>=8.0.0-0 <8.2.08.2.0

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in zstd-safe (Cargo), strongest first

Embed

A live severity badge for an advisory, README or ticket

RUSTSEC-2026-0397 severity on Zeptric[![RUSTSEC-2026-0397](https://zeptric.io/badge/cve/RUSTSEC-2026-0397.svg)](https://zeptric.io/cve/RUSTSEC-2026-0397)