Intel

AIKIDO-2026-671914

lru is vulnerable to Use-After-Free

Use-After-Free Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 11, 2026

59

Medium Risk

This Affects:

RUSTlru
0.6.4 - 0.18.1
Fixed in 0.18.2
Are you affected? Scan for Free

TL;DR

The pop method on LruCache frees a cache node's heap allocation and runs the stored key's destructor before detaching the node from the internal doubly linked list. When a key type has a Drop implementation that panics, unwinding skips the detach step, so the neighboring list nodes keep raw pointers into the freed allocation. Later cache operations then dereference those dangling pointers, producing a use-after-free that is reachable from safe Rust. The fix detaches the node from the list before dropping the key so the list stays consistent even if the destructor panics.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you store keys whose Drop implementation can panic and keep using the cache after catching the unwind.

Background info

lru is vulnerable to Use-After-Free in versions 0.6.4 - 0.18.1.

How to fix this

Upgrade the lru library to the patch version.