Every CVE Search/ Get API key

CVE-2021-28035

Drop of uninitialized memory in stack_dst

9.8 CriticalFix available

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.

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

1.29%Up 0.9 points since Apr 14, 2021
90%50%10%1%

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 drop of uninitialized memory can occur upon a val.clone() panic.

Record
CVE-2021-28035
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-908
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 drop of uninitialized memory can occur upon a val.clone() panic.

Record
CVE-2021-28035
Updated
2026-11-02
EUVDEUVD-2021-1969 No score

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.

Record
EUVD-2021-1969
Updated
2026-11-03
GitHub AdvisoriesGHSA-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 CriticalCVSS: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-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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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

Affected packages
PackageAffectedFixed
stack_dst
crates.io
before 0.6.1
0.6.1
stack_dst
crates.io
From an advisory covering 2 CVEs
before 0.6.1
0.6.1
stack_dst
crates.io
From an advisory covering 2 CVEs
0.0.0-0 up to 0.6.1
0.6.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-28035 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

MoveEnter Open