Skip to content

CVE-2022-39246 matrix-android-sdk2 vulnerable to impersonation via forwarded Megolm sessions

MediumCVSS 5.3 EPSS 0.87%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial

Description

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).

Upgrade path

3 packages: 2 fixed.

PackageAffectedFixed inStatus
matrix software development kit < 1.5.1 1.5.1 Fixed
org.matrix.android/matrix-android-sdk2(Maven) < 1.5.1; <= 1.4.36; = 0.0.2; = 1.2.1 +22 more 1.5.1 Fixed
matrix-org matrix-android-sdk2 = < 1.5.1 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
org.matrix.android/matrix-android-sdk2(Maven) <= 1.4.36 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) < 1.5.1 1.5.1
org.matrix.android/matrix-android-sdk2(Maven) = 0.0.2 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.2.1 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.2.2 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.0 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.10 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.13 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.14 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.18 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.2 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.4 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.7 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.8 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.3.9 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.11 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.13 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.14 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.16 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.2 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.25 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.27 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.32 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.34 No fix listed
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.36 No fix listed
Show 3 more
ProductAffected versionsFixed in
org.matrix.android/matrix-android-sdk2(Maven) = 1.4.4 No fix listed
matrix-org matrix-android-sdk2 = < 1.5.1 No fix listed
matrix software development kit < 1.5.1 1.5.1

References