icon

We found results for “

WS-2023-0111

Good to know:

icon

Date: April 23, 2023

The macro relied on an expression of the form Enum::Variant always being a variant of the enum. However, it may also be an associated integer constant, in which case there's no guarantee that the value of said constant consists only of bits valid for this bitflag type. Thus, code like this could create an invalid BitFlags<Test>, which would cause iterating over it to trigger undefined behavior. As the debug formatter internally iterates over the value, it is also affected. This affects the crate enumflags2 from 0.7.0 before 0.7.7.

Language: RUST

Severity Score

Severity Score

Weakness Type (CWE)

Incorrect Bitwise Shift of Integer

CWE-1335

Top Fix

icon

Upgrade Version

Upgrade to version enumflags2 - 0.7.7

Learn More

CVSS v3.1

Base Score:
Attack Vector (AV): NETWORK
Attack Complexity (AC): LOW
Privileges Required (PR): NONE
User Interaction (UI): REQUIRED
Scope (S): UNCHANGED
Confidentiality (C): NONE
Integrity (I): NONE
Availability (A): HIGH

Do you need more information?

Contact Us