Miggo Logo

CVE-2021-45708: Abomonation transmutes &T to and from &[u8] without sufficient constraints

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.52109%
Published
1/6/2022
Updated
6/13/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:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
abomonationrust<= 0.7.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The core vulnerability stems from unsafe transmute operations between arbitrary types and byte slices. The advisory specifically references transmute operations at the heart of serialization/deserialization. encode() and decode() are fundamental functions in serialization crates that would handle these conversions. The CWE-668 exposure occurs because these functions: 1) Assume repr(Rust) layout stability 2) Ignore alignment requirements 3) Expose padding bytes 4) Allow pointer reconstruction. The high confidence comes from the advisory's direct mention of these being central operations and the nature of Rust serialization patterns.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*n issu* w*s *is*ov*r** in t** **omon*tion *r*t* t*rou** v*rsion *.*.* *or Rust. ****us* tr*nsmut* op*r*tions *r* insu**i*i*ntly *onstr*in**, t**r* **n ** *n in*orm*tion l**k or *SLR *yp*ss.

Reasoning

T** *or* vuln*r**ility st*ms *rom uns*** tr*nsmut* op*r*tions **tw**n *r*itr*ry typ*s *n* *yt* sli**s. T** **visory sp**i*i**lly r***r*n**s tr*nsmut* op*r*tions *t t** ***rt o* s*ri*liz*tion/**s*ri*liz*tion. `*n*o**()` *n* `***o**()` *r* *un**m*nt*l