Miggo Logo

CVE-2019-25010: Rust Failure Crate Vulnerable to Type confusion

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.61972%
Published
8/25/2021
Updated
11/9/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
failurerust<= 0.1.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems directly from the ability to override private_get_type_id in manual implementations of the Fail trait. This method is used internally for type checking during downcasting operations. When overridden incorrectly, it breaks the type system's assumptions, leading to type confusion (CWE-843). The advisory explicitly states that derived implementations are safe, but manual implementations of this specific method create the vulnerability. Multiple sources (CVE, GHSA, RustSec) directly reference this function as the attack vector.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

S*** Rust *o** **n impl*m*nt m*l*un*tionin* `__priv*t*_**t_typ*_i*__` *n* **us* typ* *on*usion w**n *own**stin*, w*i** is *n un***in** ****vior. Us*rs w*o **riv* **il tr*it *r* not *****t**.

Reasoning

T** vuln*r**ility st*ms *ir**tly *rom t** **ility to ov*rri** __priv*t*_**t_typ*_i*__ in m*nu*l impl*m*nt*tions o* t** **il tr*it. T*is m*t*o* is us** int*rn*lly *or typ* ****kin* *urin* *own**stin* op*r*tions. W**n ov*rri***n in*orr**tly, it *r**ks