Skip to content

RUSTSEC-2026-0002: IterMut violates Stacked Borrows by invalidating internal pointerΒ #788

@github-actions

Description

@github-actions

IterMut violates Stacked Borrows by invalidating internal pointer

Details
Status unsound
Package lru
Version 0.14.0
URL jeromefroe/lru-rs#224
Date 2026-01-07

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.

See advisory page for additional details.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions