Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2021-30456
Rust vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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).

Mitigation and workarounds

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).

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

CVE-2026-68537HIGH7.5
  • Rust logoRust
  • fulgur
NoYesSep 17, 2026
CVE-2026-68523HIGH7.5
  • Rust logoRust
  • fulgur
NoYesSep 17, 2026
RUSTSEC-2026-0289NONEN/A
  • Rust logoRust
  • pqc_kyber
NoNoSep 17, 2026
RUSTSEC-2026-0287NONEN/A
  • Rust logoRust
  • cosmian_kyber
NoNoSep 17, 2026
RUSTSEC-2026-0286NONEN/A
  • Rust logoRust
  • cryptoki
NoYesSep 16, 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