{"id":"CVE-2021-26954","aliases":["CVE-2021-26954","GHSA-68p4-pjpf-xwcq","RUSTSEC-2021-0018"],"related":[],"kind":"vulnerability","state":"published","title":"insert_slice_clone can double drop if Clone panics.","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate qwutils versiones anteriores a  0.3.1 para Rust.&#xa0;Cuando ocurre un pánico de Clone, la función  insert_slice_clone puede llevar a cabo una doble caída","source":"nvd"}],"published":"2021-02-03T12:00:00.000Z","modified":"2026-06-17T03:44:04.157Z","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:L","score":5.3,"rating":"MEDIUM"},"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:L","score":5.3,"rating":"MEDIUM"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"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:L","score":5.3,"rating":"MEDIUM"},{"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","fixed":"0.3.1"}],"ecosystem":"crates.io","package":"qwutils","purl":"pkg:cargo/qwutils","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.3.1"}],"ecosystem":"crates.io","package":"qwutils","purl":"pkg:cargo/qwutils","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.3.1"}],"vendor":"qwutils_project","product":"qwutils","cpe":"cpe:2.3:a:qwutils_project:qwutils:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0018.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-26954","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/qwertz19281/rust_utils/issues/3","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/qwertz19281/rust_utils/commit/20cb73d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/qwertz19281/rust_utils","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/qwutils","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-26954","url":"https://www.cve.org/CVERecord?id=CVE-2021-26954","licence":"CVE Terms of Use","modified":"2024-08-03T20:33:41.328Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-68p4-pjpf-xwcq","url":"https://github.com/advisories/GHSA-68p4-pjpf-xwcq","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:23.024Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0018","url":"https://rustsec.org/advisories/RUSTSEC-2021-0018.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:23.024Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-26954","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26954","licence":"Public domain","modified":"2026-06-17T03:44:04.157Z"}],"updatedAt":"2026-11-25T22:57:59.874Z","epss":{"score":0.01376,"percentile":0.72843,"date":"2026-12-01T12:00:22.000Z"}}