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.

  1. Upgrade

    Upgrade rust/heapless to 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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203