{"id":"CVE-2021-31996","aliases":["EUVD-2021-1775","GHSA-jh37-772x-4hpw","RUSTSEC-2021-0053"],"status":"published","title":"Double free in algorithmica","description":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. There is a double free in merge_sort::merge().","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-10","score":0.00961,"percentile":0.61865,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-415"],"published":"2021-03-07T12:00:00Z","modified":"2026-06-17T03:52:38Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"algorithmica","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.1.8"}]}]},{"source":"osv","ecosystem":"crates.io","package":"algorithmica","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.1.8"}]}]},{"source":"osv","ecosystem":"crates.io","package":"algorithmica","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"products":[{"vendor":"algorithmica_project","product":"algorithmica"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0053.html","tags":["x_refsource_MISC","x_transferred","Vendor Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31996","tags":["advisory"]},{"url":"https://github.com/AbrarNitk/algorithmica/issues/1","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-jh37-772x-4hpw"},{"url":"https://crates.io/crates/algorithmica","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-31996","description":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. There is a double free in merge_sort::merge().","status":"published","published":"2021-05-03T06:01:21Z","modified":"2024-08-03T23:10:31.325Z","updated_at":"2026-11-02T14:33:05.665371Z"}],"euvd":[{"id":"EUVD-2021-1775","description":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. There is a double free in merge_sort::merge().","status":"published","published":"2021-05-03T06:01:21Z","modified":"2024-08-03T23:10:31Z","updated_at":"2026-11-03T03:24:37.97373Z"}],"ghsa":[{"id":"GHSA-jh37-772x-4hpw","title":"Double free in algorithmica","description":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. In the affected versions of this crate, `merge_sort::merge()` wildly duplicates and drops ownership of `T` without guarding against double-free. Due to such implementation, simply invoking `merge_sort::merge()` on `Vec\u003cT: Drop\u003e` can cause **double free** bugs.\n","status":"published","published":"2021-08-25T21:01:52Z","modified":"2023-01-09T05:04:42Z","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:10.502376Z"}],"nvd":[{"id":"CVE-2021-31996","description":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. There is a double free in merge_sort::merge().","status":"published","published":"2021-05-03T07:15:07.577Z","modified":"2026-06-17T03:52:38.717Z","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:52.81233Z"}],"osv":[{"id":"GHSA-jh37-772x-4hpw","title":"Double free in algorithmica","description":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. In the affected versions of this crate, `merge_sort::merge()` wildly duplicates and drops ownership of `T` without guarding against double-free. Due to such implementation, simply invoking `merge_sort::merge()` on `Vec\u003cT: Drop\u003e` can cause **double free** bugs.\n","status":"published","published":"2021-08-25T21:01:52Z","modified":"2023-11-08T04:05:51.884944Z","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:50.336262Z"},{"id":"RUSTSEC-2021-0053","title":"'merge_sort::merge()' crashes with double-free for `T: Drop`","description":"In the affected versions of this crate, `merge_sort::merge()` wildly duplicates and drops ownership of `T` without guarding against double-free. Due to such implementation,\nsimply invoking `merge_sort::merge()` on `Vec\u003cT: Drop\u003e` can cause **double free** bugs.","status":"published","published":"2021-03-07T12:00:00Z","modified":"2023-11-08T04:05:51.884944Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
