Intel

AIKIDO-2026-439418

arrayvec is vulnerable to Double Free

Double Free Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Today

35

Low Risk

This Affects:

RUSTarrayvec
0.7.5 - 0.7.6
Fixed in 0.7.7
Are you affected? Scan for Free

TL;DR

ArrayVec::extend_from_iter, used by extend(), collect(), and FromIterator, skips writing each element for zero-sized types but still increments the vector length. For a zero-sized type that implements Drop, the moved element is dropped once when the loop iteration ends and again later when the ArrayVec is dropped or cleared. This double drop is undefined behavior that any safe caller can trigger by extending an ArrayVec with such elements. The fix calls mem::forget on the element in the zero-sized case so it is dropped exactly once.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you store a zero-sized type that implements Drop in an ArrayVec populated via extend(), collect(), or FromIterator.

Background info

arrayvec is vulnerable to Double Free in versions 0.7.5 - 0.7.6.

How to fix this

Upgrade the arrayvec library to the patch version.