SEVERITY NOT PROVIDED

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

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
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
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](https://github.com/DRMacIver) and [https://github.com/MJUCOM](https://github.com/MJUCOM).

References

Source records: RUSTSEC-2026-0581 (OSV.dev).