Skip to content

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

@vicanso

Description

@vicanso

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions