enum-map is vulnerable to Type Confusion
10
Low Risk
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.
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.
enum-map is vulnerable to Type Confusion in versions 3.0.0 - 3.0.0.
Upgrade the enum-map 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