// For flags

CVE-2022-39246

matrix-android-sdk2 vulnerable to impersonation via forwarded Megolm sessions

Severity Score

5.3
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

matrix-android-sdk2 is the Matrix SDK for Android. Prior to version 1.5.1, 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 key forwarding strategy implemented in the matrix-android-sdk2 that is too permissive. Starting with version 1.5.1, the default policy for accepting key forwards has been made more strict in the matrix-android-sdk2. The matrix-android-sdk2 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). As a workaroubnd, current users of the SDK can disable key forwarding in their forks using `CryptoService#enableKeyGossiping(enable: Boolean)`.

matrix-android-sdk2 es el SDK de Matrix para Android. En versiones anteriores a 1.5.1, 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 una estrategia de reenvío de claves implementada en el matrix-android-sdk2 que es demasiado permisiva. A partir de la versión 1.5.1, la política por defecto para aceptar reenvíos de claves es hecho más estricta en matrix-android-sdk2. El matrix-android-sdk2 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 de "trusted" en el mensaje descifrado al descifrarlo, basándose en si la clave usada para descifrar el mensaje fue recibida de una fuente confiable. Los clientes deben asegurarse de que los mensajes descifrados con una clave con "trusted = false" sean decorados apropiadamente (por ejemplo, mostrando una advertencia para tales mensajes). Como mitigación, los usuarios actuales del SDK pueden deshabilitar el reenvío de claves en sus forks usando "CryptoService#enableKeyGossiping(enable: Boolean)"

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
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"
Software Development Kit
Search vendor "Matrix" for product "Software Development Kit"
< 1.5.1
Search vendor "Matrix" for product "Software Development Kit" and version " < 1.5.1"
android
Affected