Skip to content
OpenAdvisories
Unscored RUSTSEC-2026-0405

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

Published Oct 16, 2026 · Updated Nov 2, 2026 · Assigned by RUSTSEC

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.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io zstd-safe >= 7.2.2, < 7.4.0 · >= 8.0.0-0, < 8.2.0 7.4.0, 8.2.0 RUSTSEC-2026-0405

References