Skip to main content
← All vulnerabilities
RUSTSEC-2026-0405

Out-of-bounds read with an out-of-range `InBuffer::pos`

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 8.2.0
None on Exploit-DB, Metasploit or GitHub

Summary

This vulnerability affects the Rust bindings for the zstd (Zstandard) compression library, specifically its streaming interface. An attacker-controlled or invalid buffer position can cause the library to read past the end of the input and compress memory outside the intended data into the output, potentially leaking sensitive information.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original description

`InBuffer`'s fields are public, so safe code can set `pos` past the end of `src`. The position was passed to the C library unchecked, and `ZSTD_seekable_compressStream`, unlike the other streaming functions, does not validate it: it read past the end of the input slice, by up to the frame size, and compressed that memory into the output. The flaw was corrected by checking the position before every call into the C library.

Timeline

  1. Advisory published
  2. Record last updated

Affected versions

  • zstd-safecrates.io

    From 7.2.2 · fixed in 8.2.0

References 4

crates.io

rustsec.org

GitHub · gyscos/zstd-rs