Summary
Matrix JavaScript SDK's key history sharing could share keys to malicious devices
Workarounds
Remove use of affected functionality from clients.
References
For more information
If you have any questions or comments about this advisory, please email us at security at matrix.org.
Impact
In matrix-js-sdk versions 9.11.0 through 34.7.0, the method MatrixClient.sendSharedHistoryKeys is vulnerable to interception by malicious homeservers. The method implements functionality proposed in MSC3061 and can be used by clients 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 application does not adequately verify the identity of a user, device, or process before granting access. Typical impact: unauthorized access to functions or data reserved for authenticated parties.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in matrix-js-sdk 34.8.0 by removing the vulnerable functionality.
Frequently Asked Questions
- What is CVE-2024-47080? CVE-2024-47080 is a high-severity improper authentication vulnerability in matrix-js-sdk (npm), affecting versions >= 9.11.0, < 34.8.0. It is fixed in 34.8.0. The application does not adequately verify the identity of a user, device, or process before granting access.
- Which versions of matrix-js-sdk are affected by CVE-2024-47080? matrix-js-sdk (npm) versions >= 9.11.0, < 34.8.0 is affected.
- Is there a fix for CVE-2024-47080? Yes. CVE-2024-47080 is fixed in 34.8.0. Upgrade to this version or later.
- Is CVE-2024-47080 exploitable, and should I be worried? Whether CVE-2024-47080 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-47080 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-47080? Upgrade
matrix-js-sdkto 34.8.0 or later.