Rust advisories / algorithmica
Vulnerability HighRUSTSEC-2021-0053 · algorithmica
RUSTSEC-2021-0053: 'merge_sort::merge()' crashes with double-free for `T: Drop`
Short answerA security vulnerability in the algorithmica crate: 'merge_sort::merge()' crashes with double-free for `T: Drop`. GitHub rates it High. No fixed version: replace the crate or remove the affected code path.
| Crate | algorithmica |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Every version. |
| Fixed in | none |
| Severity | High (GitHub rating) |
| Published | 2021-03-07 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2021-31996, GHSA-jh37-772x-4hpw |
What to do
- Find who pulls it in:
cargo tree -i algorithmica. - Avoid the affected API, or replace the crate.
Details from the advisory
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.
References
- Package: crates.io/crates/algorithmica
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0053.html
- Report: github.com/AbrarNitk/algorithmica/issues/1
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?