CVE-2022-39246: matrix-android-sdk2 vulnerable to impersonation via forwarded Megolm sessions
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34706%
CWE
Published
9/30/2022
Updated
1/29/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.matrix.android:matrix-android-sdk2 | maven | <= 1.4.36 | 1.5.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper validation of forwarded Megolm keys. The key functions MXMegolmDecryption.onRoomKeyEvent and MXOlmDevice.addInboundGroupSession lacked critical checks for: 1) Whether keys were requested 2) Device verification status 3) Trust chain validation. The patch added 'trusted' flags, request validation through UnRequestedForwardManager, and strict checks against the crypto config's limitRoomKeyRequestsToMyDevices setting. These functions were directly involved in the permissive key acceptance logic that allowed malicious homeservers to inject spoofed messages.