CVE-2022-39248
Java vulnerability analysis and mitigation

Overview

CVE-2022-39248 affects matrix-android-sdk2, the Matrix SDK for Android, prior to version 1.5.1. The vulnerability allows an attacker cooperating with a malicious homeserver to construct messages that legitimately appear to have come from another person, without any indication such as a grey shield. This protocol confusion vulnerability was discovered by researchers from Royal Holloway University London, University of Sheffield, and Brave Software, and was disclosed on September 28, 2022 (Matrix Blog, NVD).

Technical details

The vulnerability stems from a protocol confusion bug where the SDK accepts to-device messages encrypted with Megolm instead of Olm, attributing them to the Megolm sender rather than the actual sender. Additionally, matrix-android-sdk2 would sign such a key backup with its device key, spreading trust to other devices trusting the matrix-android-sdk2 device. The issue was fixed in version 1.5.1 by modifying the SDK to only accept Olm-encrypted to-device messages and stopping the signing of backups on successful decryption (GitHub Advisory).

Impact

An attacker could perform a targeted attack to send fake to-device messages appearing to originate from another user. This could be exploited to inject the key backup secret during a self-verification, making a targeted device start using a malicious key backup spoofed by the homeserver. The vulnerability affects applications using matrix-android-sdk2, including Element, Beeper, Cinny, SchildiChat, Circuli, and Synod.im (Matrix Blog).

Mitigation and workarounds

The vulnerability was patched in matrix-android-sdk2 version 1.5.1. The fix includes only accepting Olm-encrypted to-device messages and stopping the signing of backups on successful decryption. Additional security measures were implemented, including discarding cleartext messages and secrets received from untrusted devices. For users who cannot immediately update, the main workaround is to avoid verifying new logins using emoji/QR verification methods until patched (GitHub Advisory).

Community reactions

The Matrix.org Foundation acknowledged the severity of the vulnerability and thanked the security researchers for their deep dive investigation. They emphasized that this was an implementation issue rather than a protocol flaw, noting that independently implemented clients using the Matrix spec were not affected. The foundation also announced plans for additional security measures, including ongoing public independent audits and future protocol changes (Matrix Blog).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66516CRITICAL10
  • JavaJava
  • tika
NoYesDec 04, 2025
CVE-2025-66566HIGH8.2
  • JavaJava
  • org.lz4:lz4-java
NoYesDec 05, 2025
CVE-2025-66623HIGH7.4
  • JavaJava
  • io.strimzi:strimzi
NoYesDec 05, 2025
CVE-2025-11222MEDIUM6.1
  • JavaJava
  • com.linecorp.centraldogma:centraldogma-server-auth-shiro
NoYesDec 04, 2025
CVE-2025-66453MEDIUM5.5
  • JavaJava
  • org.mozilla:rhino
NoYesDec 03, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management