Vulnerability DatabaseGHSA-qq4c-hm99-979m

GHSA-qq4c-hm99-979m
Rust vulnerability analysis and mitigation

Overview

The vulnerability (GHSA-qq4c-hm99-979m) affects the id-map Rust crate versions 0.1.6 through 0.2.1, discovered and disclosed in August 2025. The issue lies in the constructor idmap::IdMap::fromiter, which can create ill-formed objects where the amount of initialized memory is less than expected by the IdMap fields (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from a flaw in the IdMap::from_iter constructor where the ids field is initialized based on the capacity of the values vector, rather than its actual length. When the vector's length is smaller than its capacity, the destructor incorrectly assumes values contains ids.len() == values.capacity() initialized elements. This mismatch leads to the destructor attempting to iterate over and drop uninitialized memory (GitHub Issue). The vulnerability has been assigned a CVSS v4.0 score of 6.9 (Moderate) with the vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N (GitHub Advisory).

Impact

When exploited, this vulnerability results in undefined behavior and potential segmentation faults due to the dereferencing and attempted freeing of uninitialized memory. The issue primarily affects the availability of systems using the vulnerable versions of the id-map crate (RustSec Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 0.2.2 of the id-map crate, where all unsafe code was removed. The maintainer recommends using alternative crates such as slab or slotmap as better-optimized alternatives (GitHub Advisory, RustSec Advisory).

Additional resources


SourceThis report was generated using AI

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