{"id":"CVE-2021-31996","aliases":["CVE-2021-31996","GHSA-jh37-772x-4hpw","RUSTSEC-2021-0053"],"related":[],"kind":"vulnerability","state":"published","title":"Double free in algorithmica","summary":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. There is a double free in merge_sort::merge().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the algorithmica crate through 2021-03-07 for Rust. There is a double free in merge_sort::merge().","source":"cvelist"},{"lang":"en","text":"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<T: Drop>` can cause **double free** bugs.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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<T: Drop>` can cause **double free** bugs.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate algorithmica hasta el 07-03-2021 para Rust.&#xa0;Se presenta una doble liberación en la función merge_sort::merge().","source":"nvd"}],"published":"2021-03-07T12:00:00.000Z","modified":"2026-06-17T03:52:38.717Z","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":"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-415"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.1.8"}],"ecosystem":"crates.io","package":"algorithmica","purl":"pkg:cargo/algorithmica","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"algorithmica","purl":"pkg:cargo/algorithmica","source":"rustsec"},{"ranges":[{"status":"affected","lastAffected":"2021-03-07"}],"vendor":"algorithmica_project","product":"algorithmica","cpe":"cpe:2.3:a:algorithmica_project:algorithmica:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0053.html","tags":["advisory","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31996","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/AbrarNitk/algorithmica/issues/1","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/algorithmica","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31996","url":"https://www.cve.org/CVERecord?id=CVE-2021-31996","licence":"CVE Terms of Use","modified":"2024-08-03T23:10:31.325Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jh37-772x-4hpw","url":"https://github.com/advisories/GHSA-jh37-772x-4hpw","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:51.884Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0053","url":"https://rustsec.org/advisories/RUSTSEC-2021-0053.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:51.884Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31996","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31996","licence":"Public domain","modified":"2026-06-17T03:52:38.717Z"}],"updatedAt":"2026-11-25T22:58:01.130Z","epss":{"score":0.00995,"percentile":0.63635,"date":"2026-12-01T12:00:22.000Z"}}