{"id":"CVE-2021-28035","aliases":["EUVD-2021-1969","GHSA-45w7-7g63-2m5w","GHSA-8mjx-h23h-w2pg","RUSTSEC-2021-0033"],"status":"published","title":"Drop of uninitialized memory in stack_dst","description":"An issue was discovered in the stack_dst crate before 0.6.1 for Rust. Because of the push_inner behavior, a drop of uninitialized memory can occur upon a val.clone() panic.","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-09","score":0.01295,"percentile":0.70535,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-415","CWE-908"],"published":"2021-02-22T12:00:00Z","modified":"2026-06-17T03:45:45Z","fixes":[{"ecosystem":"crates.io","package":"stack_dst","fixed_in":["0.6.1"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"stack_dst","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"stack_dst","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"crates.io","package":"stack_dst","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"crates.io","package":"stack_dst","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.6.1"}]}],"bundled":2}],"products":[{"vendor":"stack_dst_project","product":"stack_dst"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0033.html","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28035","tags":["advisory"]},{"url":"https://github.com/thepowersgang/stack_dst-rs/issues/5","tags":["web","report"]},{"url":"https://github.com/thepowersgang/stack_dst-rs/commit/2a4d538","tags":["web"]},{"url":"https://github.com/advisories/GHSA-45w7-7g63-2m5w"},{"url":"https://github.com/thepowersgang/stack_dst-rs","tags":["package"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-28034","tags":["advisory"]},{"url":"https://github.com/thepowersgang/stack_dst-rs/commit/2a4d53809e3000f40085f2b229b6b1a33759881d","tags":["web"]},{"url":"https://crates.io/crates/stack_dst","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-28035","description":"An issue was discovered in the stack_dst crate before 0.6.1 for Rust. Because of the push_inner behavior, a drop of uninitialized memory can occur upon a val.clone() panic.","status":"published","published":"2021-03-05T08:39:33Z","modified":"2024-08-03T21:33:17.142Z","updated_at":"2026-11-02T14:33:09.175141Z"}],"euvd":[{"id":"EUVD-2021-1969","description":"An issue was discovered in the stack_dst crate before 0.6.1 for Rust. Because of the push_inner behavior, a drop of uninitialized memory can occur upon a val.clone() panic.","status":"published","published":"2021-03-05T08:39:33Z","modified":"2024-08-03T21:33:17Z","updated_at":"2026-11-03T03:24:47.350261Z"}],"ghsa":[{"id":"GHSA-45w7-7g63-2m5w","title":"Drop of uninitialized memory in stack_dst","description":"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.\n","status":"published","published":"2021-09-01T18:30:55Z","modified":"2023-06-13T20:53:06Z","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-908"],"updated_at":"2026-11-02T14:36:54.225318Z"}],"nvd":[{"id":"CVE-2021-28035","description":"An issue was discovered in the stack_dst crate before 0.6.1 for Rust. Because of the push_inner behavior, a drop of uninitialized memory can occur upon a val.clone() panic.","status":"published","published":"2021-03-05T09:15:14.317Z","modified":"2026-06-17T03:45:45.39Z","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-908"],"updated_at":"2026-11-02T14:06:50.399901Z"}],"osv":[{"id":"GHSA-45w7-7g63-2m5w","title":"Drop of uninitialized memory in stack_dst","description":"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.\n","status":"published","published":"2021-09-01T18:30:55Z","modified":"2023-11-08T04:05:27.911039Z","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-908"],"updated_at":"2026-11-02T15:46:36.434231Z"},{"id":"GHSA-8mjx-h23h-w2pg","title":"Double free in stack_dst","description":"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.","status":"published","published":"2021-09-01T18:30:44Z","modified":"2023-11-08T04:05:27.911039Z","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:42.437513Z"},{"id":"RUSTSEC-2021-0033","title":"push_cloned can drop uninitialized memory or double free on panic","description":"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.","status":"published","published":"2021-02-22T12:00:00Z","modified":"2023-11-08T04:05:27.911039Z","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"}]}}
