Potential use-after-free due to lack of panic safety in `LruCache::pop()`
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
osv · RUSTSEC-2026-0253
Published`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: - The node is freed from the map, but remains linked in the LRU list due to the skipped `detach()` call - When a new insertion causes eviction, the LRU traversal encounters the dangling pointer - This results in a write to already-freed memory during the eviction process ## Impact - **CWE-416 (Use-After-Free):** memory corruption when subsequent cache operations access freed node pointers in the linked list - **CWE-415 (Double Free):** potential heap corruption when the same memory is freed multiple times Both 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. ## Fix Fixed in `lru` 0.18.2 by detaching the node from the linked list before freeing it and dropping the key ([lru-rs#238](https://github.com/jeromefroe/lru-rs/pull/238)).
- Source published
- 12 May 2026 12:00:00 UTC
- Source modified
- 11 Aug 2026 11:15:06 UTC
- Saved here
- 24 Oct 2026 13:19:54 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.