RUSTSEC-2026-0405
JSON

Not scored

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

Severity
Not scored
Published
Last changed

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.

Affected

Product or packageVersionsReported by
zstd-safe (crates.io)from 7.2.2 before 7.4.0, from 8.0.0-0 before 8.2.0RustSec Advisory Database

References

Sources

SourceRecordLicence
RustSec Advisory DatabaseRUSTSEC-2026-0405 changed 2026-11-02CC0-1.0