RUSTSEC-2026-0581: `Deque::make_contiguous` could lead to broken invariants
Published 2026-11-18 · Updated 2026-11-19
Summary
The `Deque::make_contiguous` function in the heapless crate incorrectly set internal indices in certain branches, leading to broken invariants and out-of-bounds writes. Developers using affected versions of the heapless crate should update immediately.
Who is affected
Deployments utilizing the `heapless` crate are affected when calling `Deque::make_contiguous`, which under specific conditions corrupts internal state. This memory safety violation can result in out-of-bounds writes and unpredictable runtime behavior.
Exploitability
Exploitability metrics such as CVSS vector and EPSS are currently not documented or not yet available. CISA Known Exploited Vulnerabilities indicates no active exploitation.
Remediation
- Update the heapless crate to version 0.9.4 or later.
How to check your project
- Check Cargo.lock or Cargo.toml for dependencies on the `heapless` crate within the affected version range (introduced 0.0.0-0, fixed 0.9.4).
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| crates.io | heapless |
>= 0.0.0-0, < 0.9.4 | 0.9.4 | cargo update -p heapless --precise 0.9.4 |
FAQ
Which package is affected by RUSTSEC-2026-0581?
The crates.io package 'heapless' is affected.
What is the fixed version for this vulnerability?
Version 0.9.4 resolves the issue.
Is there any known exploitation in the wild?
No, CISA Known Exploited Vulnerabilities indicates no.
Original advisory description
References
- PACKAGE https://crates.io/crates/heapless
- ADVISORY https://rustsec.org/advisories/RUSTSEC-2026-0581.html
- REPORT https://github.com/rust-embedded/heapless/issues/694
- REPORT https://github.com/rust-embedded/heapless/issues/676
Source records: RUSTSEC-2026-0581 (OSV.dev).