Vulnerability DatabaseRUSTSEC-2025-0050

RUSTSEC-2025-0050
Rust vulnerability analysis and mitigation

Overview

A memory safety vulnerability was discovered in the id-map Rust crate version 0.2.1, identified as RUSTSEC-2025-0050. The vulnerability was discovered by the PursecLab research team and reported on August 5, 2025. The issue affects objects created with the IdMap::from_iter constructor, which can lead to deallocation of uninitialized memory (GitHub Issue).

Technical details

The vulnerability stems from the implementation of IdMap::fromiter where the function uses the capacity of the values vector to initialize the ids field of the resulting IdMap object. When the IdMap is dropped, the dropvalues method attempts to deallocate each element in the ids field. The issue occurs because drop_values iterates over ids and uses each id as an index into the values vector. If values.len() is less than values.capacity(), then id may exceed the length of values, resulting in an attempt to drop uninitialized memory (GitHub Issue).

Impact

When exploited, this vulnerability leads to undefined behavior and can cause segmentation faults in applications using the affected id-map crate. The issue specifically manifests when dropping objects created with IdMap::from_iter, potentially causing application crashes and memory corruption (GitHub Issue).

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