Zstd safe: Out-of-bounds read with an out-of-range `InBuffer::pos`
Affects zstd-safeSource GCVE Database
0
Severity
UnratedRated by Threat Radar
- Patch
- Available – fixed in 8.2.0
Data as of 26 Oct 2026, 16:13 UTC
What to do
Upgrade zstd-safe to 8.2.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
crates.iozstd-safepkg:cargo/zstd-safeOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
Community reviews
Loading reviews…