RUSTSEC-2026-0581: `Deque::make_contiguous` could lead to broken invariants
Unknown
- OSV id
- RUSTSEC-2026-0581
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| heapless Cargo |
>= 0.0.0-0, < 0.9.4 | 0.9.4 |
How to fix it
Upgrade heapless to 0.9.4 or later.
cargo update -p heapless --precise 0.9.4
- If it is an indirect dependency, `cargo update -p` still works; if a parent crate pins an older version, upgrade that crate.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
In some branches, Deque::make_contiguous set the back value to either 0 or N when it shouldn't, leading to broken invariants and out-of-bounds writes.
Reported by DRMacIver and https://github.com/MJUCOM.
References
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: RustSec Advisory Database via OSV.dev (CC0 1.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.