CVE-2022-39246: Impersonation Vulnerability in org.matrix.android:matrix-android-sdk2

Summary

30/09/2022
Yes i
High
7.5

CVE-2022-39246: matrix-android-sdk2 vulnerable to impersonation via forwarded Megolm sessions. Affects org.matrix.android:matrix-android-sdk2 versions < 1.5.1. Fixed in 1.5.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

org.matrix.android:matrix-android-sdk2 is an open-source software development kit (SDK) for Android applications that enables developers to integrate Matrix communication functionality into their apps. The SDK provides features such as end-to-end encryption, message synchronization, and key management. However, versions prior to 1.5.1 of the SDK are vulnerable to an impersonation attack via forwarded Megolm sessions.

Vulnerability Detail

The vulnerability allows an attacker who collaborates with a malicious homeserver to create messages that appear to originate from another person. While some platforms may display these messages with a grey shield, others may not provide any visual indication of the impersonation. The root cause of this vulnerability is the matrix-android-sdk2's implementation of a permissive key forwarding strategy on the receiving end. Key forwarding is a mechanism that allows clients to recover from 'unable to decrypt' messages by requesting and receiving the necessary encryption keys. However, the matrix-android-sdk2 accepts forwarded keys without proper verification, enabling an attacker to forge messages. This vulnerability can have serious consequences, as it undermines the integrity and trustworthiness of the communication platform.

How To Fix

Latest published version: 1.6.62 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.5.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Users of the matrix-android-sdk2 can disable key forwarding in their forks by using the 'CryptoService#enableKeyGossiping(enable: Boolean)' method.

Conclusion

The vulnerability in org.matrix.android:matrix-android-sdk2 allows attackers to impersonate other users and send forged messages. To mitigate this vulnerability, it is crucial to update to version 1.5.1 or later of the SDK and implement stricter key forwarding policies. Additionally, users can disable key forwarding as a temporary workaround. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for org.matrix.android:matrix-android-sdk2 →

Share this vulnerability

FAQ

The vulnerability allows an attacker to impersonate other users and send messages that appear to come from them. This can lead to various malicious activities, such as spreading misinformation, conducting phishing attacks, or manipulating conversations.

To fix this vulnerability, you should update your implementation of the matrix-android-sdk2 to version 1.5.1 or later. Additionally, ensure that key forwarding is enabled only for trusted devices and that messages decrypted with untrusted keys are appropriately handled.

Yes, users can disable key forwarding in their forks of the matrix-android-sdk2 by using the 'CryptoService#enableKeyGossiping(enable: Boolean)' method.

Some platforms may display impersonated messages with a grey shield, but this visual indication may not be present in all cases. It is important to be cautious and verify the authenticity of messages, especially if they seem suspicious or unexpected.

Related vulnerabilities

Recent vulnerabilities recorded for org.matrix.android:matrix-android-sdk2.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 1.6.62 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.5.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback