Vulnerability CriticalRUSTSEC-2018-0008 · slice-deque
RUSTSEC-2018-0008: Bug in SliceDeque::move_head_unchecked allows read of corrupted memory
Short answerA security vulnerability in the slice-deque crate: Bug in SliceDeque::move_head_unchecked allows read of corrupted memory. Critical severity (CVSS 9.8). Fixed in 0.1.16: update to a fixed version.
| Crate | slice-deque |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.1.16. |
| Fixed in | 0.1.16 |
| 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 | 2018-12-05 |
| Last changed | 2026-02-04 |
| Also known as | CVE-2018-20995, GHSA-hr3c-6mmp-6m39 |
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.1.16") 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 did not properly update the head and tail of the deque when inserting and removing elements from the front if, before insertion or removal, the tail of the deque was in the mirrored memory region, and if, after insertion or removal, the head of the deque is exactly at the beginning of the mirrored memory region.
An attacker that controls both element insertion and removal into the deque could put it in a corrupted state. Once the deque enters such an state, its head and tail are corrupted, but in bounds of the allocated memory. This can result in partial reads and writes, reads of uninitialized memory, reads of memory containing previously dropped objects, etc. An attacker could exploit this to alter program execution.
The flaw was corrected by properly updating the head and tail of the deque in this case.
References
- Package: crates.io/crates/slice-deque
- Advisory: rustsec.org/advisories/RUSTSEC-2018-0008.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-2019-0002 · 2019-05-07Bug in SliceDeque::move_head_unchecked corrupts its 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?