Intel

AIKIDO-2026-671914

lru is vulnerable to Use-After-Free

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

59

CVE Score

Medium

Use-After-Free

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.

How do I fix this?

Upgrade the lru library to the patch version.

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.

Package

Versions

0.6.4 - 0.18.1

Fixed in 0.18.2

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea