Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. lru
  4. ›
  5. GHSA-rhfx-m35p-ff5j

GHSA-rhfx-m35p-ff5j: `IterMut` violates Stacked Borrows by invalidating internal pointer

January 7, 2026

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.

References

  • github.com/advisories/GHSA-rhfx-m35p-ff5j
  • github.com/jeromefroe/lru-rs
  • github.com/jeromefroe/lru-rs/pull/224
  • rustsec.org/advisories/RUSTSEC-2026-0002.html

Code Behaviors & Features

Detect and mitigate GHSA-rhfx-m35p-ff5j with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.9.0 before 0.16.3

Fixed versions

  • 0.16.3

Solution

Upgrade to version 0.16.3 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-476: NULL Pointer Dereference

Source file

cargo/lru/GHSA-rhfx-m35p-ff5j.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:37:16 +0000.