{"id":"RUSTSEC-2026-0405","summary":"Out-of-bounds read with an out-of-range `InBuffer::pos`","details":"`InBuffer`'s fields are public, so safe code can set `pos` past the end of\n`src`. The position was passed to the C library unchecked, and\n`ZSTD_seekable_compressStream`, unlike the other streaming functions, does\nnot validate it: it read past the end of the input slice, by up to the\nframe size, and compressed that memory into the output.\n\nThe flaw was corrected by checking the position before every call into the\nC library.","modified":"2026-10-26T14:00:05.680942523Z","published":"2026-10-16T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/zstd-safe"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0405.html"},{"type":"WEB","url":"https://github.com/gyscos/zstd-rs/commit/20d397c0d68d8b4300c5493875ebfa10e355fcdd"},{"type":"WEB","url":"https://github.com/gyscos/zstd-rs/pull/384"}],"affected":[{"package":{"name":"zstd-safe","ecosystem":"crates.io","purl":"pkg:cargo/zstd-safe"},"ranges":[{"type":"SEMVER","events":[{"introduced":"7.2.2"},{"fixed":"8.2.0"}]}],"ecosystem_specific":{"affects":{"functions":["zstd_safe::seekable::SeekableCStream::compress_stream"],"arch":[],"os":[]},"affected_functions":null},"database_specific":{"cvss":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0405.json","informational":"unsound","categories":["memory-exposure"]}}],"schema_version":"1.9.0"}