CVE-2022-39254:
When matrix-nio receives forwarded room keys, the receiver doesn't check if it requested the key from the forwarder
8.6
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.23016%
CWE
Published
9/30/2022
Updated
9/7/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
matrix-nio | pip | < 0.20 | 0.20 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the _handle_forwarded_room_key_event function's lack of sender device validation. The commit diff shows the fix introduced a new _should_accept_forward method that adds three critical checks: 1) device exists in store, 2) device is verified, and 3) device belongs to the current user. The original vulnerable version lacked these checks, allowing any device (even untrusted or malicious) to fulfill key requests as long as they had a matching session ID.