RUSTSEC-2026-0002: `IterMut` violates Stacked Borrows by invalidating internal pointer
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 147
- Forks
- 39
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 2
Description
IterMutviolates Stacked Borrows by invalidating internal pointer
| Details | |
|---|---|
| Status | unsound |
| Package | lru |
| Version | 0.12.5 |
| URL | https://github.com/jeromefroe/lru-rs/pull/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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the repository's dependency declarations and checking whether lru 0.12.5 is used. Read the linked lru-rs pull request and the RustSec advisory for the affected IterMut behavior. Done means the repository no longer relies on the affected version and its dependency resolution reflects the chosen remediation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100