SEVERITY NOT PROVIDED

RUSTSEC-2026-0576: `IndexMap::truncate` could lead to an inconsistent state

Published 2026-11-18 · Updated 2026-11-19

Summary

The `IndexMap::truncate` method in the heapless crate fails to rebuild internal indices, causing an inconsistent state and memory corruption. Developers using heapless versions prior to 0.9.4 should upgrade immediately.

Who is affected

All projects depending on the heapless crate at versions 0.0.0 through 0.9.3 are affected. The vulnerability manifests when the `IndexMap::truncate` method is called, leaving the internal index structure in an inconsistent state that can lead to memory corruption. No additional conditions beyond calling this method are required for the flaw to trigger.

Exploitability

No CVSS vector or base score is provided, so exploitability cannot be quantified. EPSS data is not yet available for this vulnerability. CISA Known Exploited Vulnerabilities catalog does not list this issue, indicating no confirmed 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 crate and versions are affected?

The heapless crate on crates.io, versions 0.0.0 through 0.9.3 inclusive.

What is the root cause of the vulnerability?

`IndexMap::truncate` does not rebuild its internal indices when truncating, leaving the map in an inconsistent state that can cause memory corruption.

Is there a workaround if upgrading is not immediately possible?

Not documented; the only supported remediation is upgrading to heapless 0.9.4 or later.

Original advisory description
`IndexMap::truncate` was not rebuilding indices when it should, leading to an inconsistent state and memory corruption. Reported by [Jacob Finkelman](https://github.com/Eh2406).

References

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