PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet
Vulnerability DatabaseRUSTSEC-2021-0030

RUSTSEC-2021-0030: 
Rust vulnerability analysis and mitigation

Overview

A double-free vulnerability was discovered in the scratchpad crate versions before 1.3.1 for Rust, identified as RUSTSEC-2021-0030. The vulnerability was found by the Rust group at Georgia Tech's Systems Software & Security Lab (sslab-gatech) while scanning Rust code on crates.io. The issue was reported on February 18, 2021, affecting the move_elements function in the crate (GitHub Issue).

Technical details

The vulnerability occurs in the move_elements function where a double-free condition can arise upon a panic in a user-provided closure function. The issue affects two specific functions: ::Item]>::move_elements() and traits::SliceMoveSource>::move_elements(). The vulnerability has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating high severity across confidentiality, integrity, and availability impacts (NVD).

Impact

When exploited, this vulnerability can lead to undefined behavior in safe Rust code. The double-free condition can occur when an object is dropped twice upon panic in the user-provided closure, potentially leading to memory corruption and program crashes (GitHub Issue).

Exploitability

The vulnerability can be triggered through safe Rust code without requiring unsafe blocks. A proof-of-concept exists demonstrating the issue using a simple struct with a Drop implementation, where the drop function is called twice when a panic occurs in the closure passed to move_elements (GitHub Issue).

Mitigation and workarounds

The vulnerability has been fixed in version 1.3.1 of the scratchpad crate. Users are advised to upgrade to this version or later to address the double-free issue (NVD).

Additional resources


Source: This report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-fj85-w6rj-rxrcHIGH7.8
  • Rust logoRust
  • ipc-channel
NoYesOct 24, 2026
GHSA-cc53-p78w-23w9MEDIUM6.3
  • Rust logoRust
  • skiplist
NoYesOct 24, 2026
GHSA-924w-mwc9-86m8LOW2.1
  • Rust logoRust
  • skiplist
NoYesOct 24, 2026
GHSA-v8f6-5mx7-9fffLOWN/A
  • Rust logoRust
  • kule
NoYesOct 24, 2026
GHSA-mr6f-2w9f-qrf8LOWN/A
  • Rust logoRust
  • kule
NoYesOct 24, 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