Skip to content

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

Unknown
Published
Updated
Exploit status
No public exploit known

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.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
crates.io zstd-safe(crates.io) >= 7.2.2, < 7.4.0; >= 8.0.0-0, < 8.2.0 7.4.0, 8.2.0 Fixed

Affected products

ProductAffected versionsFixed in
crates.io zstd-safe(crates.io) >= 7.2.2, < 7.4.0 7.4.0
crates.io zstd-safe(crates.io) >= 8.0.0-0, < 8.2.0 8.2.0

References