Advisory

RUSTSEC-2026-0002

Also known as: GHSA-rhfx-m35p-ff5j

Summary

IterMut violates Stacked Borrows by invalidating internal pointer

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-01-07 12:00 UTC
Modified
2026-01-08 05:56 UTC

Affected packages and fixes

lru

crates.io · All systems

Affected

  • introduced 0.9.0, fixed 0.16.3 (semver)

Fixed versions

0.16.3

Fix

  • Fixed version 0.16.3
    cargo update -p lru --precise 0.16.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences