{"id":"CVE-2021-29940","aliases":["CVE-2021-29940","GHSA-5hpj-m323-cphm","RUSTSEC-2021-0049"],"related":[],"kind":"vulnerability","state":"published","title":"Double free in through","summary":"An issue was discovered in the through crate through 2021-02-18 for Rust. There is a double free (in through and through_and) upon a panic of the map function.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the through crate through 2021-02-18 for Rust. There is a double free (in through and through_and) upon a panic of the map function.","source":"cvelist"},{"lang":"en","text":"`through` and `through_and` take a mutable reference as well as a mapping\nfunction to change the provided reference. They do this by calling `ptr::read`\non the reference which duplicates ownership and then calling the mapping\nfunction.\n\nIf the mapping function panics, both the original object and the one\nduplicated by `ptr::read` get dropped, causing a double free.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate through hasta el 18-02-2021 para Rust.&#xa0;Se presenta una doble liberación (en through y through_and) tras un pánico de la función map.","source":"nvd"}],"published":"2021-02-18T12:00:00.000Z","modified":"2026-06-17T03:48:28.783Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.1.0"}],"ecosystem":"crates.io","package":"through","purl":"pkg:cargo/through","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"through","purl":"pkg:cargo/through","source":"rustsec"},{"ranges":[{"status":"affected","lastAffected":"2021-02-18"}],"vendor":"through_project","product":"through","cpe":"cpe:2.3:a:through_project:through:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0049.html","tags":["advisory","exploit","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29940","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/gretchenfrage/through/issues/1","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/gretchenfrage/through","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/through","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29940","url":"https://www.cve.org/CVERecord?id=CVE-2021-29940","licence":"CVE Terms of Use","modified":"2024-08-03T22:18:03.206Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5hpj-m323-cphm","url":"https://github.com/advisories/GHSA-5hpj-m323-cphm","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:44.127Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0049","url":"https://rustsec.org/advisories/RUSTSEC-2021-0049.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:44.127Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29940","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29940","licence":"Public domain","modified":"2026-06-17T03:48:28.783Z"}],"updatedAt":"2026-11-25T22:58:00.540Z","epss":{"score":0.01373,"percentile":0.72794,"date":"2026-12-01T12:00:22.000Z"}}