8.7high
Malicious homeservers can steal message keys when the matrix-react-sdk user invites another user to a room
- Severity
- 8.7high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.66% (higher than 52% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-qcvh-p9jq-wp8v
Description
matrix-react-sdk is react-based software development kit for inserting a Matrix chat/VOIP client into a web page. Starting in version 3.18.0 and before 3.102.0, matrix-react-sdk allows a malicious homeserver to potentially steal message keys for a room when a user invites another user to that room, via injection of a malicious device controlled by the homeserver. This is possible because matrix-react-sdk before 3.102.0 shared historical message keys on invite. Version 3.102.0 fixes this issue by disabling sharing message keys on invite by removing calls to the vulnerable functionality. No known workarounds are available.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| matrix-org matrix-react-sdk | >= 3.18.0, < 3.102.0 | CVE List |
| matrix-react-sdk_project matrix-react-sdk | up to 3.18.0, up to 3.102.0 | CVE List |
| matrix-react-sdk (npm) | from 3.18.0 before 3.102.0 | GitHub Advisory Database |
All scores
| GitHub_M | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | 0.0high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
matrix-react-sdk is react-based software development kit for inserting a Matrix chat/VOIP client into a web page. Starting in version 3.18.0 and before 3.102.0, matrix-react-sdk allows a malicious homeserver to potentially steal message keys for a room when a user invites another user to that room, via injection of a malicious device controlled by the homeserver. This is possible because matrix-react-sdk before 3.102.0 shared historical message keys on invite. Version 3.102.0 fixes this issue by disabling sharing message keys on invite by removing calls to the vulnerable functionality. No known workarounds are available.
GitHub Advisory Database
Impact
matrix-react-sdk before 3.102.0 allows a malicious homeserver to potentially steal message keys for a room when a user invites another user to that room, via injection of a malicious device controlled by the homeserver. This is possible because matrix-react-sdk before 3.102.0 shared historical message keys on invite.
Patches
matrix-react-sdk 3.102.0 disables sharing message keys on invite by removing calls to the vulnerable functionality.
Workarounds
None.
References
The vulnerability in matrix-react-sdk is caused by calling MatrixClient.sendSharedHistoryKeys in matrix-js-sdk, which is inherently vulnerable to this sort of attack. This matrix-js-sdk vulnerability is tracked as CVE-2024-47080 / GHSA-4jf8-g8wp-cx7c. Given that this functionality is not specific to sharing message keys on invite, is optional, has to be explicitly called by the caller and has been independently patched in matrix-react-sdk by removing the offending calls, we believe it is proper to treat the matrix-react-sdk vulnerability as a separate one, with its own advisory and CVE.
The matrix-org/matrix-react-sdk repository has recently been archived and the project was moved to element-hq/matrix-react-sdk. Given that this happened after the first patched release, no releases of the project on element-hq/matrix-react-sdk were ever vulnerable to this vulnerability.
Patching pull request: https://github.com/matrix-org/matrix-react-sdk/pull/12618.
For more information
If you have any questions or comments about this advisory, please email us at security at security at matrix.org.
NVD (es)
matrix-react-sdk es un kit de desarrollo de software basado en React para insertar un cliente de chat/VOIP Matrix en una página web. A partir de la versión 3.18.0 y antes de la 3.102.0, matrix-react-sdk permite que un servidor doméstico malintencionado robe potencialmente claves de mensajes para una sala cuando un usuario invita a otro usuario a esa sala, mediante la inyección de un dispositivo malintencionado controlado por el servidor doméstico. Esto es posible porque matrix-react-sdk anterior a la 3.102.0 compartía claves de mensajes históricas en la invitación. La versión 3.102.0 corrige este problema al deshabilitar el uso compartido de claves de mensajes en la invitación eliminando las llamadas a la funcionalidad vulnerable. No hay workarounds disponibles.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-47824 changed 2024-11-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qcvh-p9jq-wp8v changed 2024-10-15 | CC-BY-4.0 |
| NVD | CVE-2024-47824 changed 2026-06-17 | Public domain |