High severity · published Oct 15, 2024
CVE-2024-47080
matrix-js-sdk keys sent via `sendSharedHistoryKeys` vulnerable to interception by malicious homeserver
8.7
CVSS
0.7%
EPSS
No
On KEV
Description
matrix-js-sdk is the Matrix Client-Server SDK for JavaScript and TypeScript. In matrix-js-sdk versions versions 9.11.0 through 34.7.0, the method `MatrixClient.sendSharedHistoryKeys` is vulnerable to interception by malicious homeservers. The method was introduced by MSC3061) and is commonly used to share historical message keys with newly invited users, granting them access to past messages in the room. However, it unconditionally sends these "shared" keys to all of the invited user's devices, regardless of whether the user's cryptographic identity is verified or whether the user's devices are signed by that identity. This allows the attacker to potentially inject its own devices to receive sensitive historical keys without proper security checks. Note that this only affects clients running the SDK with the legacy crypto stack. Clients using the new Rust cryptography stack (i.e. those that call `MatrixClient.initRustCrypto()` instead of `MatrixClient.initCrypto()`) are unaffected by this vulnerability, because `MatrixClient.sendSharedHistoryKeys()` raises an exception in such environments. The vulnerability was fixed in matrix-js-sdk 34.8.0 by removing the vulnerable functionality. As a workaround, remove use of affected functionality from clients.
Exploitation
Is it being used?
Exploit prediction (EPSS)0.7% · higher than 52% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
MA
matrix-js-sdk · matrix-org
>= 9.11.0, < 34.8.0 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-47080
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-47080
github.com
https://github.com/matrix-org/matrix-js-sdk/commit/2fb1e659c81f75253c047832dc9dcc2beddfac5f
github.com
https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-4jf8-g8wp-cx7c
github.com
https://github.com/matrix-org/matrix-spec-proposals/pull/3061
More from matrix-js-sdk
7.5
CVE-2022-39250
Matrix JavaScript SDK vulnerable to key/device identifier confusion in SAS verification
5.3
CVE-2024-50336
matrix-js-sdk has insufficient MXC URI validation which allows client-side path traversal
5.3
CVE-2024-42369
A room with itself as a its predecessor will freeze matrix-js-sdk
2.7
CVE-2025-59160
matrix-js-sdk has insufficient validation when considering a room to be upgraded by another
