{"id":"CVE-2021-28034","aliases":["CVE-2021-28034","GHSA-45w7-7g63-2m5w","GHSA-8mjx-h23h-w2pg","RUSTSEC-2021-0033"],"related":["CVE-2021-28035"],"kind":"vulnerability","state":"published","title":"Drop of uninitialized memory in stack_dst","summary":"An issue was discovered in the stack_dst crate before 0.6.1 for Rust. Because of the push_inner behavior, a double free can occur upon a val.clone() panic.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the stack_dst crate before 0.6.1 for Rust. Because of the push_inner behavior, a double free can occur upon a val.clone() panic.","source":"cvelist"},{"lang":"en","text":"Affected versions of stack_dst used a push_inner function that increased the internal length of the array and then called val.clone(). If the val.clone() call panics, the stack could drop an already dropped element or drop uninitialized memory. This issue was fixed in `2a4d538` by increasing the length of the array after elements are cloned.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Affected versions of `stack_dst` used a `push_inner` function that increased\nthe internal length of the array and then called `val.clone()`.\n\nIf the `val.clone()` call panics, the stack could drop an already dropped\nelement or drop uninitialized memory.\n\nThis issue was fixed in `2a4d538` by increasing the length of the array after\nelements are cloned.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate stack_dst versiones anteriores a 0.6.1 para Rust.&#xa0;Debido al comportamiento de push_inner, puede ocurrir una doble liberación tras un pánico de la función val.clone()","source":"nvd"}],"published":"2021-02-22T12:00:00.000Z","modified":"2026-06-17T03:45:45.270Z","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","CWE-908"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"stack_dst","purl":"pkg:cargo/stack_dst","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"stack_dst","purl":"pkg:cargo/stack_dst","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"stack_dst","purl":"pkg:cargo/stack_dst","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.6.1"}],"vendor":"stack_dst_project","product":"stack_dst","cpe":"cpe:2.3:a:stack_dst_project:stack_dst:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0033.html","tags":["advisory","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28035","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/thepowersgang/stack_dst-rs/issues/5","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/thepowersgang/stack_dst-rs/commit/2a4d538","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/thepowersgang/stack_dst-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28034","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/thepowersgang/stack_dst-rs/commit/2a4d53809e3000f40085f2b229b6b1a33759881d","tags":["web"],"sources":["ghsa"]},{"url":"https://crates.io/crates/stack_dst","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-28034","url":"https://www.cve.org/CVERecord?id=CVE-2021-28034","licence":"CVE Terms of Use","modified":"2024-08-03T21:33:17.320Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-45w7-7g63-2m5w","url":"https://github.com/advisories/GHSA-45w7-7g63-2m5w","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:27.911Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8mjx-h23h-w2pg","url":"https://github.com/advisories/GHSA-8mjx-h23h-w2pg","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:27.911Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0033","url":"https://rustsec.org/advisories/RUSTSEC-2021-0033.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:27.911Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-28034","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28034","licence":"Public domain","modified":"2026-06-17T03:45:45.270Z"}],"updatedAt":"2026-11-25T22:58:00.155Z","epss":{"score":0.01311,"percentile":0.71498,"date":"2026-12-01T12:00:22.000Z"}}