RUSTSEC-2026-0405 Out-of-bounds read with an out-of-range `InBuffer::pos`
- Exploited in the wild
- Not known
- Fix
- Available
What is RUSTSEC-2026-0405?
RUSTSEC-2026-0405 is a vulnerability in zstd-safe, published on 16 Oct 2026.
Official 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.
Which versions are affected by RUSTSEC-2026-0405?
1 open source package ship an affected version, including zstd-safe.
| Package | Affected | Fixed in |
|---|---|---|
zstd-safe crates.io | From 7.2.2 | 8.2.0 |
How do I fix RUSTSEC-2026-0405?
Upgrade zstd-safe to 8.2.0 or later.
Is RUSTSEC-2026-0405 being exploited?
There is no known exploitation of RUSTSEC-2026-0405 in the wild and no public exploit code.