// For flags

CVE-2022-39249

Matrix Javascript SDK vulnerable to impersonation via forwarded Megolm sessions

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Matrix Javascript SDK is the Matrix Client-Server SDK for JavaScript. Prior to version 19.7.0, an attacker cooperating with a malicious homeserver can construct messages appearing to have come from another person. Such messages will be marked with a grey shield on some platforms, but this may be missing in others. This attack is possible due to the matrix-js-sdk implementing a too permissive key forwarding strategy on the receiving end. Starting with version 19.7.0, the default policy for accepting key forwards has been made more strict in the matrix-js-sdk. matrix-js-sdk will now only accept forwarded keys in response to previously issued requests and only from own, verified devices. The SDK now sets a `trusted` flag on the decrypted message upon decryption, based on whether the key used to decrypt the message was received from a trusted source. Clients need to ensure that messages decrypted with a key with `trusted = false` are decorated appropriately, for example, by showing a warning for such messages. This attack requires coordination between a malicious homeserver and an attacker, and those who trust your homeservers do not need a workaround.

Matrix Javascript SDK es el SDK cliente-servidor de Matrix para JavaScript. En versiones anteriores a 19.7.0, un atacante que coopere con un servidor doméstico malicioso puede construir mensajes que parezcan proceder de otra persona. Dichos mensajes estarán marcados con un escudo gris en algunas plataformas, pero éste puede faltar en otras. Este ataque es posible debido a que matrix-js-sdk implementa una estrategia de reenvío de claves demasiado permisiva en el extremo receptor. A partir de la versión 19.7.0, la política por defecto para aceptar reenvíos de claves se ha hecho más estricta en matrix-js-sdk. matrix-js-sdk ahora sólo aceptará claves reenviadas en respuesta a peticiones previamente emitidas y sólo de dispositivos propios y verificados. El SDK ahora establece un flag "trusted" en el mensaje descifrado al descifrarlo, basándose en si la clave usada para descifrar el mensaje es recibida de una fuente confiable. Los clientes deben asegurarse de que los mensajes descifrados con una clave con "trusted = false" sean decorados adecuadamente, por ejemplo, mostrando una advertencia para tales mensajes. Este ataque requiere la coordinación entre un servidor doméstico malicioso y un atacante, y aquellos que confían en sus servidores domésticos no necesitan una mitigación

A flaw was found in Mozilla. According to the Mozilla Foundation Security Advisory, Thunderbird users who use the Matrix chat protocol are vulnerable to an impersonation attack. A malicious server administrator could fake encrypted messages to look as if they were sent from another user on that server.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-09-02 CVE Reserved
  • 2022-09-28 CVE Published
  • 2024-04-20 EPSS Updated
  • 2024-08-03 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-287: Improper Authentication
  • CWE-322: Key Exchange without Entity Authentication
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Matrix
Search vendor "Matrix"
Javascript Sdk
Search vendor "Matrix" for product "Javascript Sdk"
< 19.7.0
Search vendor "Matrix" for product "Javascript Sdk" and version " < 19.7.0"
node.js
Affected