Intel

AIKIDO-2026-682008

enum-map is vulnerable to Type Confusion

Type Confusion Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 30, 2026

10

Low Risk

This Affects:

RUSTenum-map
3.0.0 - 3.0.0
Fixed in 3.1.0
Are you affected? Scan for Free

TL;DR

Affected versions of enum-map do not require the element type of the Array associated type in the Enum trait to match the array's generic parameter V. A manual Enum implementation can declare an Array<V> whose elements are not actually of type V, causing type confusion and memory corruption when the map is constructed (for example via enum_map!). Versions that use #[derive(Enum)] are not affected by a mistaken associated type. The fix adds a Value = V bound to the Array associated type so mismatched element types are rejected at compile time.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you manually implement the Enum trait with an incorrect Array associated type. Enums that use #[derive(Enum)] are not affected.

Background info

enum-map is vulnerable to Type Confusion in versions 3.0.0 - 3.0.0.

How to fix this

Upgrade the enum-map library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform