CVE-2022-39255

    Dashboard / Vulnerabilities / CVE-2022-39255

    CVE-2022-39255

    Published: 28 Sept 2022Last Modified: 12 Aug 2026

    Summary: Matrix iOS SDK vulnerable ton Olm/Megolm protocol confusion

    Details: Matrix iOS SDK allows developers to build iOS apps compatible with Matrix. Prior to version 0.23.19, an attacker cooperating with a malicious homeserver can construct messages that legitimately appear to have come from another person, without any indication such as a grey shield. Additionally, a sophisticated attacker cooperating with a malicious homeserver could employ this vulnerability to perform a targeted attack in order to send fake to-device messages appearing to originate from another user. This can allow, for example, to inject the key backup secret during a self-verification, to make a targeted device start using a malicious key backup spoofed by the homeserver. These attacks are possible due to a protocol confusion vulnerability that accepts to-device messages encrypted with Megolm instead of Olm. matrix-ios-sdk version 0.23.19 has been modified to only accept Olm-encrypted to-device messages. Out of caution, several other checks have been audited or added. This attack requires coordination between a malicious home server and an attacker, so those who trust their home servers do not need a workaround. To avoid malicious backup attacks, one should not verify one's new logins using emoji/QR verifications methods until patched.

    Affected packages

    Package

    Name:

    Purl:

    Affected ranges

    Type: GIT

    Events:

    Affected versions

    v0.23.18
    v0.23.17
    v0.23.16
    v0.23.15
    v0.23.14
    v0.23.13
    v0.23.12
    v0.23.11
    v0.23.10
    v0.23.9
    v0.23.8
    v0.23.7
    v0.23.6
    v0.23.5
    v0.23.4
    v0.23.3
    v0.23.2
    v0.23.1
    v0.23.0

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    CVE-2022-39255 | CVE-DB