RUSTSEC-2026-0582: On maps of `u16::MAX` elements, `IndexMap::insert` could lead to a broken invariant
Published Nov 18, 2026
·Updated
Note that this required filling up the map and having the last item inserted to hash to u16::MAX. It is therefore very unlikely to be reachable in a real-world scenario.
Reported by 8rsrf7.
Affected Software
1 affected componentFixes available
rust/heapless>=0.0.0-0<0.9.4
0.9.4
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rust/heaplessto a version that resolves this vulnerability.Fixed in 0.9.4
Event History
Nov 18, 2026
Advisory Published
via OSV·12:00 PM
Data Sourced
via OSV·12:00 PM
DescriptionAffected Software
Frequently Asked Questions
1
What conditions are required to trigger the broken invariant?
The map must first be filled to u16::MAX elements, and the final inserted item must hash to u16::MAX. The advisory describes this combination as very unlikely to be reachable in real-world use.
2
How likely is this to affect typical deployments?
The issue is unlikely to be reachable unless an application can create an IndexMap with u16::MAX entries and influence or encounter an insertion whose hash is exactly u16::MAX.