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

Unknown

OSV id
RUSTSEC-2026-0576
Published
Last modified

Affected packages

PackageAffected versionsFixed 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

IndexMap::truncate was not rebuilding indices when it should, leading to an inconsistent state and memory corruption.

Reported by Jacob Finkelman.

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.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

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.