RUSTSEC-2026-0253None▾ SunlitPotential use-after-free due to lack of panic safety in `LruCache::pop()`
▾ Sunlit zone — Low / medium · no exploitation signal
impact 2.8 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
LruCache::pop() in lru was not panic-safe. If the Drop implementation of a stored key panics during pop(), self.detach() is never called, leaving dangling pointers in the internal doubly-linked list.
A subsequent cache operation that triggers eviction can then dereference these dangling pointers:
detach() callBoth types of undefined behavior can be invoked in safe Rust, but only if unwinding panics are enabled and std::panic::catch_unwind is used with key types that have potentially-panicking Drop implementations.
Fixed in lru 0.18.2 by detaching the node from the linked list before freeing it and dropping the key (lru-rs#238).
lru >= 0.0.0-0, < 0.18.2Upgrade to a patched release:
lru 0.18.2