CVE-2021-28034
Rust vulnerability analysis and mitigation

Overview

An issue was discovered in the stack_dst crate before version 0.6.1 for Rust. The vulnerability (CVE-2021-28034) involves a double free condition that can occur upon a val.clone() panic due to the push_inner behavior. The issue was disclosed on March 5, 2021 (NVD, RustSec).

Technical details

The vulnerability stems from the push_inner function implementation in the stack_dst crate. When the function increases the internal length of the array and then calls val.clone(), a panic during the clone operation can trigger a double free condition. This occurs because the array length is increased before the clone operation is completed successfully. The issue received a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD, RustSec).

Impact

If exploited, this vulnerability can lead to memory corruption through a double free condition. This could potentially result in program crashes or undefined behavior when using the affected stack_dst crate versions (RustSec).

Exploitability

The vulnerability can be triggered when using the push_cloned function in the StackA implementation, specifically when a panic occurs during the val.clone() operation. The attack vector is network-accessible and requires no special privileges or user interaction to exploit (RustSec).

Mitigation and workarounds

The vulnerability was fixed in version 0.6.1 of the stack_dst crate. The fix involves modifying the implementation to increase the array length after elements are cloned, rather than before. Users should upgrade to version 0.6.1 or later to address this vulnerability (RustSec).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

RUSTSEC-2026-0236HIGH7.5
  • Rust logoRust
  • viperjs
NoYesAug 06, 2026
RUSTSEC-2026-0232HIGH7.5
  • Rust logoRust
  • nostr-relay-pool
NoYesAug 01, 2026
RUSTSEC-2026-0231HIGH7.5
  • Rust logoRust
  • nostr-relay-pool
NoYesAug 01, 2026
RUSTSEC-2026-0230HIGH7.5
  • Rust logoRust
  • nostr
NoYesAug 01, 2026
CVE-2026-68930MEDIUM6.5
  • Rust logoRust
  • russh
NoYesAug 03, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management