{"id":"DHI-mcq2-slto-zpkj-svoh","aliases":["RUSTSEC-2026-0253"],"status":"published","title":"`LruCache::pop()` in `lru` was not panic-safe. If the `Drop` implementation of a stored key panics during `pop()`…","description":"`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.\n\nA subsequent cache operation that triggers eviction can then dereference these dangling pointers:\n- The node is freed from the map, but remains linked in the LRU list due to the skipped `detach()` call\n- When a new insertion causes eviction, the LRU traversal encounters the dangling pointer\n- This results in a write to already-freed memory during the eviction process\n\n## Impact\n\n- **CWE-416 (Use-After-Free):** memory corruption when subsequent cache operations access freed node pointers in the linked list\n- **CWE-415 (Double Free):** potential heap corruption when the same memory is freed multiple times\n\nBoth 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.\n\n## Fix\n\nFixed 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)).","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-05-12T12:00:00Z","modified":"2026-11-16T02:33:47Z","fixes":[{"ecosystem":"crates.io","package":"lru","fixed_in":["0.18.2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"gitlab-rails-19","versions":["19.1.8-r0","19.1.8-r1","19.4.1-r0","19.4.1-r1","19.4.1-r2","19.4.1-r3","19.4.2-r0","19.5.3-r0","19.5.3-r1","19.5.3-r2","19.5.3-r3","19.5.3-r4","19.5.3-r5","19.5.3-r6","19.5.3-r7","19.5.3-r8","19.5.4-r0","19.5.4-r1","19.5.5-r0","19.5.5-r1","19.5.5-r2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"apollo-mcp-server-1","versions":["1.20.0-1","1.20.0-2","1.20.0-3","1.20.0-4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"apollo-mcp-server-2","versions":["2.0.0-0","2.0.0-1","2.1.0-0","2.1.0-1","2.1.0-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"apollo-mcp-server","versions":["1.17.0-0","1.18.0-0","1.19.0-0","1.20.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-core-7-fips","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-core-7","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-dev","versions":["7.80.2-0","7.80.2-1","7.80.2-10","7.80.2-11","7.80.2-12","7.80.2-13","7.80.2-14","7.80.2-15","7.80.2-2","7.80.2-3","7.80.2-4","7.80.2-5","7.80.2-6","7.80.2-7","7.80.2-8","7.80.2-9","7.84.4-0","7.84.6-0","7.84.6-1","7.84.6-2","7.85.0-0","7.85.1-0","7.85.1-1","7.85.2-0","7.85.2-1","7.85.2-2","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-fips-dev","versions":["7.80.2-0","7.80.2-1","7.80.2-10","7.80.2-11","7.80.2-12","7.80.2-13","7.80.2-14","7.80.2-2","7.80.2-3","7.80.2-4","7.80.2-5","7.80.2-6","7.80.2-7","7.80.2-8","7.80.2-9","7.84.4-0","7.84.6-0","7.84.6-1","7.84.6-2","7.85.0-0","7.85.1-0","7.85.1-1","7.85.2-0","7.85.2-1","7.85.2-2","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-fips","versions":["7.80.2-0","7.80.2-1","7.80.2-10","7.80.2-11","7.80.2-12","7.80.2-13","7.80.2-14","7.80.2-2","7.80.2-3","7.80.2-4","7.80.2-5","7.80.2-6","7.80.2-7","7.80.2-8","7.80.2-9","7.84.4-0","7.84.6-0","7.84.6-1","7.84.6-2","7.85.0-0","7.85.1-0","7.85.1-1","7.85.2-0","7.85.2-1","7.85.2-2","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-integrations-7","versions":["7.85.1-0","7.85.1-1","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-jmxfetch-7","versions":["0.52.0-0","0.52.0-1","0.52.0-2","0.52.0-3","0.52.0-4","0.52.0-5"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-process-7-fips","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-process-7","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-security-7-fips","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-security-7","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-trace-7-fips","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent-trace-7","versions":["7.85.1-0","7.85.2-0","7.85.2-1","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"datadog-agent","versions":["7.80.2-0","7.80.2-1","7.80.2-10","7.80.2-11","7.80.2-12","7.80.2-13","7.80.2-14","7.80.2-15","7.80.2-2","7.80.2-3","7.80.2-4","7.80.2-5","7.80.2-6","7.80.2-7","7.80.2-8","7.80.2-9","7.84.4-0","7.84.6-0","7.84.6-1","7.84.6-2","7.85.0-0","7.85.1-0","7.85.1-1","7.85.2-0","7.85.2-1","7.85.2-2","7.85.3-0","7.85.4-0","7.85.4-1","7.85.4-2","7.85.4-3","7.85.4-4","7.85.4-5","7.85.4-6"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"gitlab-rails-19","versions":["19.1.8-0","19.1.8-1","19.4.1-0","19.4.1-1","19.4.1-2","19.4.2-0","19.5.3-0","19.5.3-1","19.5.3-2","19.5.3-3","19.5.3-4","19.5.3-5","19.5.3-6","19.5.3-7","19.5.3-8","19.5.3-9","19.5.4-0","19.5.4-1","19.5.5-0","19.5.5-1","19.5.5-2","19.5.5-3","19.5.5-4","19.5.5-5","19.5.5-6","19.5.5-7","19.5.5-8","19.5.5-9"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"meilisearch","versions":["1.53.1-0","1.53.2-0","1.54.0-0","1.54.1-0","1.54.2-0","1.54.3-0","1.55.0-0","1.56.0-0","1.56.1-0","1.56.2-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-2.6-fips-libs","versions":["2.6.23-1","2.6.23-2","2.6.24-1","2.6.25-0","2.6.25-1","2.6.25-2","2.6.25-3","2.6.25-4","2.6.26-0","2.6.26-1","2.6.27-0","2.6.27-1","2.6.27-2","2.6.27-3","2.6.27-4","2.6.27-5","2.6.27-6","2.6.27-7","2.6.27-8"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-2.6-fips","versions":["2.6.23-1","2.6.23-2","2.6.24-1","2.6.25-0","2.6.25-1","2.6.25-2","2.6.25-3","2.6.25-4","2.6.26-0","2.6.26-1","2.6.27-0","2.6.27-1","2.6.27-2","2.6.27-3","2.6.27-4","2.6.27-5","2.6.27-6","2.6.27-7","2.6.27-8"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-2.6-libs","versions":["2.6.23-1","2.6.23-2","2.6.24-1","2.6.25-0","2.6.25-1","2.6.25-2","2.6.25-3","2.6.25-4","2.6.26-0","2.6.26-1","2.6.27-0","2.6.27-1","2.6.27-2","2.6.27-3","2.6.27-4","2.6.27-5","2.6.27-6","2.6.27-7","2.6.27-8"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-2.6","versions":["2.6.23-1","2.6.23-2","2.6.24-1","2.6.25-0","2.6.25-1","2.6.25-2","2.6.25-3","2.6.25-4","2.6.26-0","2.6.26-1","2.6.27-0","2.6.27-1","2.6.27-2","2.6.27-3","2.6.27-4","2.6.27-5","2.6.27-6","2.6.27-7","2.6.27-8"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-3.0-fips-libs","versions":["3.0.1-1","3.0.2-0","3.0.2-1","3.0.2-2","3.0.2-3","3.0.2-4","3.0.3-0","3.0.5-0","3.0.5-1","3.0.5-2","3.0.6-0","3.0.6-1","3.0.6-2","3.0.6-3","3.0.6-4","3.0.6-5","3.0.6-6","3.0.6-7"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-3.0-fips","versions":["3.0.1-1","3.0.2-0","3.0.2-1","3.0.2-2","3.0.2-3","3.0.2-4","3.0.3-0","3.0.5-0","3.0.5-1","3.0.5-2","3.0.6-0","3.0.6-1","3.0.6-2","3.0.6-3","3.0.6-4","3.0.6-5","3.0.6-6","3.0.6-7"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-3.0-libs","versions":["3.0.1-1","3.0.2-0","3.0.2-1","3.0.2-2","3.0.2-3","3.0.2-4","3.0.3-0","3.0.5-0","3.0.5-1","3.0.5-2","3.0.6-0","3.0.6-1","3.0.6-2","3.0.6-3","3.0.6-4","3.0.6-5","3.0.6-6","3.0.6-7"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"milvus-3.0","versions":["3.0.1-1","3.0.2-0","3.0.2-1","3.0.2-2","3.0.2-3","3.0.2-4","3.0.3-0","3.0.5-0","3.0.5-1","3.0.5-2","3.0.6-0","3.0.6-1","3.0.6-2","3.0.6-3","3.0.6-4","3.0.6-5","3.0.6-6","3.0.6-7"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"mise","versions":["2026.10.0-0","2026.10.1-0","2026.10.10-0","2026.10.12-0","2026.10.13-0","2026.10.14-0","2026.10.15-0","2026.10.17-0","2026.10.18-0","2026.10.19-0","2026.10.20-0","2026.10.21-0","2026.10.22-0","2026.10.23-0","2026.10.24-0","2026.10.25-0","2026.10.3-0","2026.10.4-0","2026.10.5-0","2026.10.7-0","2026.10.8-0","2026.10.9-0","2026.11.0-0","2026.11.1-0","2026.11.2-0","2026.11.3-0","2026.11.4-0","2026.11.5-0","2026.11.6-0","2026.11.7-0","2026.11.8-0","2026.9.10-0","2026.9.18-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"vector","versions":["0.58.0-0","0.59.0-0","0.60.0-0","0.61.0-0"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ztunnel-1.29-fips","versions":["1.29.10-0","1.29.10-1","1.29.10-2","1.29.7-0","1.29.7-1","1.29.8-0","1.29.9-0","1.29.9-1"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ztunnel-1.29","versions":["1.29.10-0","1.29.10-1","1.29.10-2","1.29.7-0","1.29.7-1","1.29.8-0","1.29.9-0","1.29.9-1"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ztunnel-1.30-fips","versions":["1.30.4-0","1.30.4-1","1.30.5-0","1.30.6-0","1.30.6-1","1.30.7-0","1.30.8-0","1.30.8-1","1.30.8-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ztunnel-1.30","versions":["1.30.4-0","1.30.4-1","1.30.5-0","1.30.6-0","1.30.6-1","1.30.7-0","1.30.8-0","1.30.8-1","1.30.8-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ztunnel-1.31-fips","versions":["1.31.0-0","1.31.1-0","1.31.2-0","1.31.2-1","1.31.3-0","1.31.4-0","1.31.4-1","1.31.4-2"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ztunnel-1.31","versions":["1.31.0-0","1.31.1-0","1.31.2-0","1.31.2-1","1.31.3-0","1.31.4-0","1.31.4-1","1.31.4-2"]},{"source":"osv","ecosystem":"crates.io","package":"lru","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.18.2"}]}]}],"references":[{"url":"https://scout.docker.com/v/DHI-mcq2-slto-zpkj-svoh","tags":["advisory"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0253","tags":["advisory"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0253.html","tags":["advisory"]},{"url":"https://github.com/jeromefroe/lru-rs/pull/238","tags":["fix","web"]},{"url":"https://crates.io/crates/lru","tags":["package"]}],"sources":{"osv":[{"id":"DHI-mcq2-slto-zpkj-svoh","title":"`LruCache::pop()` in `lru` was not panic-safe. If the `Drop` implementation of a stored key panics during `pop()`…","description":"`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.\n\nA subsequent cache operation that triggers eviction can then dereference these dangling pointers:\n- The node is freed from the map, but remains linked in the LRU list due to the skipped `detach()` call\n- When a new insertion causes eviction, the LRU traversal encounters the dangling pointer\n- This results in a write to already-freed memory during the eviction process\n\n## Impact\n\n- **CWE-416 (Use-After-Free):** memory corruption when subsequent cache operations access freed node pointers in the linked list\n- **CWE-415 (Double Free):** potential heap corruption when the same memory is freed multiple times\n\nBoth 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.\n\n## Fix\n\nFixed 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)).","status":"published","published":"2026-11-13T17:02:28Z","modified":"2026-11-16T02:33:47.850980417Z","updated_at":"2026-11-16T03:09:01.88532Z"},{"id":"RUSTSEC-2026-0253","title":"Potential use-after-free due to lack of panic safety in `LruCache::pop()`","description":"`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.\n\nA subsequent cache operation that triggers eviction can then dereference these dangling pointers:\n- The node is freed from the map, but remains linked in the LRU list due to the skipped `detach()` call\n- When a new insertion causes eviction, the LRU traversal encounters the dangling pointer\n- This results in a write to already-freed memory during the eviction process\n\n## Impact\n\n- **CWE-416 (Use-After-Free):** memory corruption when subsequent cache operations access freed node pointers in the linked list\n- **CWE-415 (Double Free):** potential heap corruption when the same memory is freed multiple times\n\nBoth 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.\n\n## Fix\n\nFixed 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)).","status":"published","published":"2026-05-12T12:00:00Z","modified":"2026-08-11T11:15:06.101553049Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
