Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

RUSTSEC-2026-0218

Published Jul 21, 2026·Last modified Jul 28, 2026
Affected Components(0)

No affected components available

Description

Affected versions of this crate did not require the element type of the Array associated type in the Enum trait to match the array's generic parameter V.

This can result in type confusion, and consequently memory corruption, when a manual Enum implementation declares an Array<V> whose elements are not actually of type V:

struct IntentionallyWrong;

impl Enum for IntentionallyWrong {
    type Array<V> = [String; 4];

    fn from_usize(_: usize) -> Self {
        IntentionallyWrong
    }

    fn into_usize(self) -> usize {
        0
    }
}

enum_map! { IntentionallyWrong => 42 };

The flaw was corrected in commit 7a8b815432 by adding a Value = V bound to the Array type in the Enum trait.

Risk Scores
Base Score
0.0

Measures severity based on intrinsic characteristics of the vulnerability, independent of environment.

Threat Intelligence
0.0

No exploitation activity has been observed at this time. Continue routine monitoring.

EPSS
N/A

Probability that this vulnerability will be exploited in the wild within the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard