{"id":"CVE-2021-45720","aliases":["CVE-2021-45720","GHSA-qqmc-hwqp-8g2w","GHSA-v362-2895-h9r2","RUSTSEC-2021-0130"],"related":[],"kind":"vulnerability","state":"published","title":"Use after free in lru crate","summary":"An issue was discovered in the lru crate before 0.7.1 for Rust. The iterators have a use-after-free, as demonstrated by an access after a pop operation.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the lru crate before 0.7.1 for Rust. The iterators have a use-after-free, as demonstrated by an access after a pop operation.","source":"cvelist"},{"lang":"en","text":"Lru crate has use after free vulnerability.\n\nLru crate has two functions for getting an iterator. Both iterators give\nreferences to key and value. Calling specific functions, like pop(), will remove\nand free the value, and but it's still possible to access the reference of value\nwhich is already dropped causing use after free.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Lru crate has two functions for getting an iterator. Both iterators give references to key and value. Calling specific functions, like pop(), will remove and free the value, and but it's still possible to access the reference of value which is already dropped causing use after free.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se ha detectado un problema en la crate lru versiones anteriores a 0.7.1 para Rust. Los iteradores tienen un uso de memoria previamente liberada, como lo demuestra un acceso después de una operación pop","source":"nvd"}],"published":"2021-12-21T12:00:00.000Z","modified":"2026-06-17T04:14:00.920Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.1"}],"ecosystem":"crates.io","package":"lru","purl":"pkg:cargo/lru","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.7.1"}],"ecosystem":"crates.io","package":"lru","purl":"pkg:cargo/lru","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.7.1"}],"ecosystem":"crates.io","package":"lru","purl":"pkg:cargo/lru","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.7.1"}],"vendor":"lru_project","product":"lru","cpe":"cpe:2.3:a:lru_project:lru:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0130.html","tags":["advisory","exploit","issue-tracking","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/lru/RUSTSEC-2021-0130.md","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jeromefroe/lru-rs/issues/120","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/jeromefroe/lru-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45720","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/jeromefroe/lru-rs.git","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/lru","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-45720","url":"https://www.cve.org/CVERecord?id=CVE-2021-45720","licence":"CVE Terms of Use","modified":"2024-08-04T04:47:02.036Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qqmc-hwqp-8g2w","url":"https://github.com/advisories/GHSA-qqmc-hwqp-8g2w","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:23.861Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v362-2895-h9r2","url":"https://github.com/advisories/GHSA-v362-2895-h9r2","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:23.861Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0130","url":"https://rustsec.org/advisories/RUSTSEC-2021-0130.html","licence":"CC0-1.0","modified":"2023-11-08T04:07:23.861Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-45720","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45720","licence":"Public domain","modified":"2026-06-17T04:14:00.920Z"}],"updatedAt":"2026-11-25T22:58:06.259Z","epss":{"score":0.01219,"percentile":0.6953,"date":"2026-12-02T12:00:21.000Z"}}