# RUSTSEC-2026-0397: `OutBuffer::around_pos` exposes uninitialized memory

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-10-16T12:00:00.000Z
- Modified: 2026-11-02T09:30:03.445Z

## Description

`OutBuffer::around_pos` accepted a position past the initialized length of a
`Vec<u8>`. The next streaming call then marked everything before the
position as initialized, so safe code could read stale heap memory between
the vector's previous length and that position.

The flaw was corrected by zero-filling that gap.

(As written by RustSec Advisory Database.)

## Affected

- zstd-safe (crates.io): from 4.0.0 before 7.4.0; from 8.0.0-0 before 8.2.0

## References

- <https://crates.io/crates/zstd-safe> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0397.html> (advisory)
- <https://github.com/gyscos/zstd-rs/commit/5827de2459b8ac430e87e860f00c7f3c13023833> (web)
- <https://github.com/gyscos/zstd-rs/pull/384> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0397](https://rustsec.org/advisories/RUSTSEC-2026-0397.html), CC0-1.0, modified 2026-11-02

---

Page: https://cve.day/RUSTSEC-2026-0397 · Whole record: https://cve.day/RUSTSEC-2026-0397.json · Rebuilt by cve.day 2026-11-25T22:56:43.450Z
