CVE-2021-28034
Double free in stack_dst
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2021-28034- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-415
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2021-28034- Updated
- 2026-11-02
EUVDEUVD-2021-2016 No score
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.
- Record
EUVD-2021-2016- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-8mjx-h23h-w2pg
9.8
Double free in stack_dst
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.
- Record
GHSA-8mjx-h23h-w2pg- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-415
- Updated
- 2026-11-02
OSVGHSA-45w7-7g63-2m5w
9.8
Drop of uninitialized memory in stack_dst
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.
- Record
GHSA-45w7-7g63-2m5w- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-908
- Updated
- 2026-11-02
OSVGHSA-8mjx-h23h-w2pg
9.8
Double free in stack_dst
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.
- Record
GHSA-8mjx-h23h-w2pg- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-415
- Updated
- 2026-11-02
OSVRUSTSEC-2021-0033
9.8
push_cloned can drop uninitialized memory or double free on panic
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.
- Record
RUSTSEC-2021-0033- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-28034 is a critical vulnerability (CVSS 9.8) in Stack Dst Project Dst, published February 22, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.29%, the 70th percentile. Fixed in stack_dst 0.6.1.
References
rustsec.org/advisories/RUSTSEC-2021-0033.html
nvd.nist.gov/vuln/detail/CVE-2021-28034
github.com/thepowersgang/stack_dst-rs/commit/2a4d53809e3000f40085f2b229b6b1a33759881d
github.com/thepowersgang/stack_dst-rs/issues/5
github.com/thepowersgang/stack_dst-rs/commit/2a4d538
github.com/advisories/GHSA-8mjx-h23h-w2pg
nvd.nist.gov/vuln/detail/CVE-2021-28035
github.com/thepowersgang/stack_dst-rs
crates.io/crates/stack_dst