
Cloud Vulnerability DB
A community-led vulnerabilities database
A vulnerability was discovered in the id-map crate through 2021-02-26 for Rust, identified as CVE-2021-30456. The issue involves a double free vulnerability that can occur in the get_or_insert function when a user-provided f function panics during execution (NVD, RustSec).
The vulnerability occurs specifically in the get_or_insert function of the id-map crate. The function reserves space for a value before calling the user-provided insertion function f. If the function f panics, then uninitialized or previously freed memory can be dropped, leading to a double free condition. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 CRITICAL with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).
The double free vulnerability can lead to memory corruption, potentially allowing an attacker to execute arbitrary code or cause program crashes. This type of vulnerability is particularly serious as it affects memory safety, which is one of Rust's key security guarantees (RustSec).
The vulnerability can be triggered when the user-provided function f panics during the execution of get_or_insert. This requires the ability to cause a panic in the insertion function, which could be achieved through various means depending on the specific implementation (RustSec).
As of the last available information, there are no patched versions available for this vulnerability. Users of the id-map crate should carefully review their usage of the get_or_insert function and ensure that the provided insertion functions cannot panic (RustSec).
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."