RUSTSEC-2026-0405 json
Out-of-bounds read with an out-of-range `InBuffer::pos`
published 26d ago modified 10d ago
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
`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.
Patch / fix
- crates.io zstd-safe 7.4.0, 8.2.0
- github.com/gyscos/zstd-rs@20d397c commit
- github.com/gyscos/zstd-rs#384 pull request
Is RUSTSEC-2026-0405 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | zstd-safe | >=7.2.2, <7.4.0 >=8.0.0-0, <8.2.0 |
7.4.0 8.2.0 |
References
Sources
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.