{"id":"CVE-2021-29938","aliases":["EUVD-2021-1815","GHSA-p9gf-gmfv-398m","RUSTSEC-2021-0047"],"status":"published","title":"Double free in slice-deque","description":"An issue was discovered in the slice-deque crate through 2021-02-19 for Rust. A double drop can occur in SliceDeque::drain_filter upon a panic in a predicate function.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01175,"percentile":0.67968,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-415"],"published":"2021-02-19T12:00:00Z","modified":"2026-06-17T03:48:28Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"slice-deque","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.3.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"slice-deque","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.3.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"slice-deque","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"products":[{"vendor":"slice-deque_project","product":"slice-deque"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0047.html","tags":["x_refsource_MISC","x_transferred","Exploit","Vendor Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29938","tags":["advisory"]},{"url":"https://github.com/gnzlbg/slice_deque/issues/90","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-p9gf-gmfv-398m"},{"url":"https://github.com/gnzlbg/slice_deque","tags":["package"]},{"url":"https://crates.io/crates/slice-deque","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-29938","description":"An issue was discovered in the slice-deque crate through 2021-02-19 for Rust. A double drop can occur in SliceDeque::drain_filter upon a panic in a predicate function.","status":"published","published":"2021-04-01T04:23:16Z","modified":"2024-08-03T22:18:03.279Z","updated_at":"2026-11-02T14:33:06.32268Z"}],"euvd":[{"id":"EUVD-2021-1815","description":"An issue was discovered in the slice-deque crate through 2021-02-19 for Rust. A double drop can occur in SliceDeque::drain_filter upon a panic in a predicate function.","status":"published","published":"2021-04-01T04:23:16Z","modified":"2024-08-03T22:18:03Z","updated_at":"2026-11-03T03:24:43.413555Z"}],"ghsa":[{"id":"GHSA-p9gf-gmfv-398m","title":"Double free in slice-deque","description":"An issue was discovered in the slice-deque crate through 2021-02-19 for Rust. A double drop can occur in SliceDeque::drain_filter upon a panic in a predicate function.","status":"published","published":"2021-08-25T20:54:16Z","modified":"2023-03-30T23:01:09Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T14:36:48.905887Z"}],"nvd":[{"id":"CVE-2021-29938","description":"An issue was discovered in the slice-deque crate through 2021-02-19 for Rust. A double drop can occur in SliceDeque::drain_filter upon a panic in a predicate function.","status":"published","published":"2021-04-01T05:15:14.78Z","modified":"2026-06-17T03:48:28.56Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T14:06:51.197859Z"}],"osv":[{"id":"GHSA-p9gf-gmfv-398m","title":"Double free in slice-deque","description":"An issue was discovered in the slice-deque crate through 2021-02-19 for Rust. A double drop can occur in SliceDeque::drain_filter upon a panic in a predicate function.","status":"published","published":"2021-08-25T20:54:16Z","modified":"2023-11-08T04:05:44.001761Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T15:46:52.891208Z"},{"id":"RUSTSEC-2021-0047","title":"SliceDeque::drain_filter can double drop an element if the predicate panics","description":"Affected versions of the crate incremented the current index of the drain filter\niterator *before* calling the predicate function `self.pred`.\n\nIf the predicate function panics, it is possible for the last element in the\niterator to be dropped twice.","status":"published","published":"2021-02-19T12:00:00Z","modified":"2023-11-08T04:05:44.001761Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
