{"id":"CVE-2021-29940","aliases":["EUVD-2021-1576","GHSA-5hpj-m323-cphm","RUSTSEC-2021-0049"],"status":"published","title":"Double free in through","description":"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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.01373,"percentile":0.72383,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-415"],"published":"2021-02-18T12:00:00Z","modified":"2026-06-17T03:48:28Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"through","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.1.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"through","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.1.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"through","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"products":[{"vendor":"through_project","product":"through"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0049.html","tags":["x_refsource_MISC","x_transferred","Exploit","Vendor Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29940","tags":["advisory"]},{"url":"https://github.com/gretchenfrage/through/issues/1","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-5hpj-m323-cphm"},{"url":"https://github.com/gretchenfrage/through","tags":["package"]},{"url":"https://crates.io/crates/through","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-29940","description":"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.","status":"published","published":"2021-04-01T04:22:50Z","modified":"2024-08-03T22:18:03.206Z","updated_at":"2026-11-02T14:33:06.32268Z"}],"euvd":[{"id":"EUVD-2021-1576","description":"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.","status":"published","published":"2021-04-01T04:22:50Z","modified":"2024-08-03T22:18:03Z","updated_at":"2026-11-03T03:24:43.413555Z"}],"ghsa":[{"id":"GHSA-5hpj-m323-cphm","title":"Double free in through","description":"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.","status":"published","published":"2021-08-25T20:54:12Z","modified":"2023-01-09T05:05:14Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T14:36:11.367194Z"}],"nvd":[{"id":"CVE-2021-29940","description":"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.","status":"published","published":"2021-04-01T05:15:14.907Z","modified":"2026-06-17T03:48:28.783Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T14:06:51.197859Z"}],"osv":[{"id":"GHSA-5hpj-m323-cphm","title":"Double free in through","description":"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.","status":"published","published":"2021-08-25T20:54:12Z","modified":"2023-11-08T04:05:44.127003Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T15:46:38.553953Z"},{"id":"RUSTSEC-2021-0049","title":"`through` and `through_and` causes a double free if the map function panics","description":"`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.","status":"published","published":"2021-02-18T12:00:00Z","modified":"2023-11-08T04:05:44.127003Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
