Vulnerability CriticalRUSTSEC-2019-0002 · slice-deque
RUSTSEC-2019-0002: Bug in SliceDeque::move_head_unchecked corrupts its memory
Short answerA security vulnerability in the slice-deque crate: Bug in SliceDeque::move_head_unchecked corrupts its memory. Critical severity (CVSS 9.8). Fixed in 0.2.0: update to a fixed version.
| Crate | slice-deque |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.2.0. |
| Fixed in | 0.2.0 |
| Severity | Critical, CVSS 9.8 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2019-05-07 |
| Last changed | 2026-02-04 |
| Also known as | CVE-2019-15543, GHSA-c3m3-c39q-pv23 |
What to do
- See which version you have:
cargo tree -i slice-deque(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p slice-deque. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleslice-deque = "0.2.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of this crate entered a corrupted state if mem::size_of::<T>() % allocation_granularity() != 0 and a specific allocation pattern was used: sufficiently shifting the deque elements over the mirrored page boundary.
This allows an attacker that controls controls both element insertion and removal to corrupt the deque, such that reading elements from it would read bytes corresponding to other elements in the deque. (e.g. a read of T could read some bytes from one value and some bytes from an adjacent one, resulting in a T whose value representation is not meaningful). This is undefined behavior.
The flaw was corrected by using a pair of pointers to track the head and tail of the deque instead of a pair of indices. This pair of pointers are represented using a Rust slice.
References
- Package: crates.io/crates/slice-deque
- Advisory: rustsec.org/advisories/RUSTSEC-2019-0002.html
- Report: github.com/gnzlbg/slice_deque/issues/57
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for slice-deque
- Vulnerability CriticalRUSTSEC-2018-0008 · 2018-12-05Bug in SliceDeque::move_head_unchecked allows read of corrupted memory
- UnmaintainedRUSTSEC-2020-0158 · 2020-02-10slice-deque is unmaintained
- Vulnerability HighRUSTSEC-2021-0047 · 2021-02-19SliceDeque::drain_filter can double drop an element if the predicate panics
Up next
Same crateslice-deque: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?