GHSA-rhfx-m35p-ff5j: `IterMut` violates Stacked Borrows by invalidating internal pointer
Affected versions of this crate contain a soundness issue in the IterMut iterator implementation. The IterMut::next and IterMut::nextback methods temporarily create an exclusive reference to the key when dereferencing the internal node pointer. This invalidates the shared pointer held by the internal HashMap, violating Stacked Borrows rules.
Published Jan 7, 2026
Affected packages
lru
- Ecosystem
- Rust (crates.io)
- Affected
- >= 0.9.0, < 0.16.3
- Fixed in
- 0.16.3
- Check
cargo tree -i lru
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Affected versions of this crate contain a soundness issue in the IterMut iterator implementation. The IterMut::next and IterMut::next_back methods temporarily create an exclusive reference to the key when dereferencing the internal node pointer.
This invalidates the shared pointer held by the internal HashMap, violating Stacked Borrows rules.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
