RUSTSEC-2026-0405
not scored yetOut-of-bounds read with an out-of-range `InBuffer::pos`
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
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | zstd-safe | >= 7.2.2, < 7.4.0; >= 8.0.0-0, < 8.2.0 | 7.4.0, 8.2.0 |
References
- https://crates.io/crates/zstd-safe · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0405.html · ADVISORY
- https://github.com/gyscos/zstd-rs/commit/20d397c0d68d8b4300c5493875ebfa10e355fcdd · WEB
- https://github.com/gyscos/zstd-rs/pull/384 · WEB
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Oct 2026)