HistoryEditJSON (OSV)

RUSTSEC-2026-0002

IterMut violates Stacked Borrows by invalidating internal pointer

Reported
Issued
Package
lru (crates.io)
Type
INFO Unsound
Categories
Keywords
#stacked-borrows
Aliases
References
Patched
  • >=0.16.3
Unaffected
  • <0.9.0

Description

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.

Advisory available under CC0-1.0 license.