# GHSA-x3f4-45xf-rjm7: `ruzstd` uninit and out-of-bounds memory reads

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-11-28T12:00:00.000Z
- Modified: 2026-09-10T03:50:21.770Z
- Also known as: RUSTSEC-2024-0400
- Weaknesses: CWE-125

## Description

Affected versions of `ruzstd` miscalculate the length of the allocated and init section of its internal `RingBuffer`, leading to uninitialized or out-of-bounds reads in `copy_bytes_overshooting` of up to 15 bytes.

This may result in up to 15 bytes of memory contents being written into the decoded data when decompressing a crafted archive. This may occur multiple times per archive.

(As written by GitHub Advisory Database.)

## Affected

- ruzstd (crates.io): from 0.7.0 before 0.7.3

## References

- <https://github.com/KillingSpark/zstd-rs/issues/75> (report, web)
- <https://github.com/KillingSpark/zstd-rs/pull/76> (web)
- <https://github.com/KillingSpark/zstd-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0400.html> (advisory, web)
- <https://crates.io/crates/ruzstd> (package)

## Sources

- GitHub Advisory Database: [GHSA-x3f4-45xf-rjm7](https://github.com/advisories/GHSA-x3f4-45xf-rjm7), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2024-0400](https://rustsec.org/advisories/RUSTSEC-2024-0400.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-x3f4-45xf-rjm7 · Whole record: https://cve.day/GHSA-x3f4-45xf-rjm7.json · Rebuilt by cve.day 2026-11-25T22:56:43.223Z
