Miggo Logo

CVE-2022-39252: matrix-sdk-crypto contains potential impersonation via room key forward responses

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.25026%
Published
9/30/2022
Updated
4/3/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
matrix-sdk-cryptorust< 0.6.00.6.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from the lack of sender verification in the key forwarding process. The commit diff shows that before the patch, 'receive_supported_keys' directly called 'accept_forwarded_room_key' after getting key info, without checking the sender device's ownership or trust status. The security fix introduced 'should_accept_forward' to validate: 1) the sender device belongs to the current user, and 2) the device is verified. The vulnerable function was 'receive_supported_keys' as it handled incoming keys without these critical checks prior to the patch.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t W**n m*trix-rust-s*k ***or* *.* r*qu*sts * room k*y *rom our **vi**s, it *orr**tly ****pts k*y *orw*r*s only i* t**y *r* * r*spons* to * pr*vious r*qu*st. *ow*v*r, it *o*sn't ****k t**t t** **vi** t**t r*spon*** m*t***s t** **vi** t** k*y

Reasoning

T** vuln*r**ility st*mm** *rom t** l**k o* s*n**r v*ri*i**tion in t** k*y *orw*r*in* pro**ss. T** *ommit *i** s*ows t**t ***or* t** p*t**, 'r***iv*_support**_k*ys' *ir**tly **ll** '****pt_*orw*r***_room_k*y' **t*r **ttin* k*y in*o, wit*out ****kin* t