
Cloud Vulnerability DB
A community-led vulnerabilities database
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).
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).
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).
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).
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).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."