stable-vec is vulnerable to Double Free
56
Medium Risk
The stable-vec crate relies on unsafe code in its core to manage element storage and dropping. Several methods do not stay memory-safe when an element's destructor panics, and related paths mishandle reborrowing, allocation sizes above isize::MAX, and cloning. When a drop (or clone) implementation panics, the crate can double-free memory, corrupt internal metadata, leak elements, or trigger heap overflows and other undefined behavior. The fix makes the drop, clear, extend, retain, and clone paths panic-safe and corrects the unsound reborrow and allocation-size handling.
You are affected if you use a version in the vulnerable range and store elements whose Drop or Clone implementation can panic (for example, user-supplied types with fallible destructors), so a panic during dropping or cloning can trigger the memory-safety fault.
stable-vec is vulnerable to Double Free in versions 0.0.1 - 0.4.2.
Upgrade the stable-vec library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant