Skip to content
OpenAdvisories
High · 8.6 CVE-2022-39251 EUVD-2022-6927GHSA-r48r-j8fx-mq2c

Matrix Javascript SDK vulnerable to Olm/Megolm protocol confusion

Published Sep 28, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

Description

Matrix Javascript SDK is the Matrix Client-Server SDK for JavaScript. Prior to version 19.7.0, 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. Starting with version 19.7.0, matrix-js-sdk 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.

Affected products

VendorProductAffectedFixed
matrix-org matrix-js-sdk < 19.7.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 11 node-matrix-js-sdk No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS node-matrix-js-sdk No fix yet —
Ubuntu 22.04 LTS node-matrix-js-sdk No fix yet —
Ubuntu 22.04 LTS thunderbird 1:102.4.2+build2-0ubuntu0.22.04.1 USN-5724-1
Ubuntu 20.04 LTS node-matrix-js-sdk No fix yet —
Ubuntu 20.04 LTS thunderbird 1:102.4.2+build2-0ubuntu0.20.04.1 USN-5724-1
Ubuntu 18.04 LTS thunderbird 1:102.4.2+build2-0ubuntu0.18.04.1 USN-5724-1
ReleasePackageFixed inAdvisory
RHEL 9 thunderbird 102.4.0-1.el9_0 RHSA-2022:7178
RHEL 8 thunderbird 102.4.0-1.el8_6 RHSA-2022:7190
RHEL 7 thunderbird 102.4.0-1.el7_9 RHSA-2022:7184
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 8.4 EUS thunderbird 102.4.0-1.el8_4 RHSA-2022:7181
RHEL 8.2 EUS thunderbird 102.4.0-1.el8_2 RHSA-2022:7182
RHEL 8.1 E4S thunderbird 102.4.0-1.el8_1 RHSA-2022:7183

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 thunderbird 102.4.0-1.el9_0.alma ALSA-2022:7178
AlmaLinux 8 thunderbird 102.4.0-1.el8_6.alma ALSA-2022:7190

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 thunderbird 102.4.0-1.el8_6 RLSA-2022:7190
ReleasePackageFixed inAdvisory
SLES 15 SP4 MozillaThunderbird 102.4.0-150200.8.85.1 SUSE-SU-2022:3800-1
SLES 15 SP3 MozillaThunderbird 102.4.0-150200.8.85.1 SUSE-SU-2022:3800-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed MozillaThunderbird 102.3.1-1.1 openSUSE-SU-2024:12379-1
openSUSE Tumbleweed element-web +1 1.11.8-1.1 openSUSE-SU-2024:12375-1, openSUSE-SU-2024:12374-1
openSUSE Leap 15.4 MozillaThunderbird 102.4.0-150200.8.85.1 SUSE-SU-2022:3800-1
openSUSE Leap 15.3 MozillaThunderbird 102.4.0-150200.8.85.1 SUSE-SU-2022:3800-1
ReleasePackageFixed inAdvisory
Alpine v3.24 element-web 1.11.7-r0 —
Alpine v3.23 element-web 1.11.7-r0 —
Alpine v3.22 element-web 1.11.7-r0 —
Alpine v3.21 element-web 1.11.7-r0 —
Alpine v3.20 element-web 1.11.7-r0 —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 element-web 1.11.7-r0 —
Alpine v3.18 element-web 1.11.7-r0 —
Alpine v3.17 riot-web 1.11.7-r0 —
Alpine v3.16 riot-web 1.11.7-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 thunderbird 102.4.0-1.amzn2.0.1 ALAS2-2022-1900

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 thunderbird 102.4.0-1.el9_0 ELSA-2022-7178
Oracle Linux 8 thunderbird 102.4.0-1.0.1.el8_6 ELSA-2022-7190
Oracle Linux 7 thunderbird 102.4.0-1.0.1.el7_9 ELSA-2022-7184

Affected packages

EcosystemPackageAffectedFixedRecord
npm matrix-js-sdk < 19.7.0 19.7.0 GHSA-r48r-j8fx-mq2c

Advisories 19

References