{"id":"CVE-2021-26954","aliases":["EUVD-2022-2752","GHSA-68p4-pjpf-xwcq","RUSTSEC-2021-0018"],"status":"published","title":"insert_slice_clone can double drop if Clone panics.","description":"An issue was discovered in the qwutils crate before 0.3.1 for Rust. When a Clone panic occurs, insert_slice_clone can perform a double drop.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.01376,"percentile":0.72433,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-415"],"published":"2021-02-03T12:00:00Z","modified":"2026-06-17T03:44:04Z","fixes":[{"ecosystem":"crates.io","package":"qwutils","fixed_in":["0.3.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"qwutils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"qwutils","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.3.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"qwutils","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.1"}]}]}],"products":[{"vendor":"qwutils_project","product":"qwutils"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0018.html","tags":["x_refsource_MISC","x_transferred","Exploit","Vendor Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26954","tags":["advisory"]},{"url":"https://github.com/qwertz19281/rust_utils/issues/3","tags":["web","report"]},{"url":"https://github.com/qwertz19281/rust_utils/commit/20cb73d","tags":["web"]},{"url":"https://github.com/advisories/GHSA-68p4-pjpf-xwcq"},{"url":"https://github.com/qwertz19281/rust_utils","tags":["package"]},{"url":"https://crates.io/crates/qwutils","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-26954","description":"An issue was discovered in the qwutils crate before 0.3.1 for Rust. When a Clone panic occurs, insert_slice_clone can perform a double drop.","status":"published","published":"2021-02-09T22:07:33Z","modified":"2024-08-03T20:33:41.328Z","updated_at":"2026-11-02T14:32:57.033395Z"}],"euvd":[{"id":"EUVD-2022-2752","description":"An issue was discovered in the qwutils crate before 0.3.1 for Rust. When a Clone panic occurs, insert_slice_clone can perform a double drop.","status":"published","published":"2021-02-09T22:07:33Z","modified":"2024-08-03T20:33:41Z","updated_at":"2026-11-03T03:24:50.383074Z"}],"ghsa":[{"id":"GHSA-68p4-pjpf-xwcq","title":"insert_slice_clone can double drop if Clone panics.","description":"Affected versions of this crate used ptr::copy when inserting into the middle of a Vec. When ownership was temporarily duplicated during this copy, it calls the clone method of a user provided element.\n\nThis issue can result in an element being double-freed if the clone call panics.\n\nCommit `20cb73d` fixed this issue by adding a set_len(0) call before operating on the vector to avoid dropping the elements during a panic.","status":"published","published":"2022-05-24T17:41:47Z","modified":"2023-06-13T20:09:09Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T14:36:53.654352Z"}],"nvd":[{"id":"CVE-2021-26954","description":"An issue was discovered in the qwutils crate before 0.3.1 for Rust. When a Clone panic occurs, insert_slice_clone can perform a double drop.","status":"published","published":"2021-02-09T23:15:13.85Z","modified":"2026-06-17T03:44:04.157Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","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:50.031227Z"}],"osv":[{"id":"GHSA-68p4-pjpf-xwcq","title":"insert_slice_clone can double drop if Clone panics.","description":"Affected versions of this crate used ptr::copy when inserting into the middle of a Vec. When ownership was temporarily duplicated during this copy, it calls the clone method of a user provided element.\n\nThis issue can result in an element being double-freed if the clone call panics.\n\nCommit `20cb73d` fixed this issue by adding a set_len(0) call before operating on the vector to avoid dropping the elements during a panic.","status":"published","published":"2022-05-24T17:41:47Z","modified":"2023-11-08T04:05:23.024619Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-415"],"updated_at":"2026-11-02T15:46:39.266402Z"},{"id":"RUSTSEC-2021-0018","title":"insert_slice_clone can double drop if Clone panics.","description":"Affected versions of this crate used `ptr::copy` when inserting into the middle\nof a `Vec`. When ownership was temporarily duplicated during this copy, it calls\nthe clone method of a user provided element.\n\nThis issue can result in an element being double-freed if the clone call panics.\n\nCommit `20cb73d` fixed this issue by adding a `set_len(0)` call before\noperating on the vector to avoid dropping the elements during a panic.","status":"published","published":"2021-02-03T12:00:00Z","modified":"2023-11-08T04:05:23.024619Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
