Skip to content
OpenAdvisories
High · 8.6 CVE-2022-39250 EUVD-2022-6713GHSA-5w8r-8pgj-5jmf

Matrix JavaScript SDK vulnerable to key/device identifier confusion in SAS verification

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

Description

Matrix JavaScript SDK is the Matrix Client-Server software development kit (SDK) for JavaScript. Prior to version 19.7.0, an attacker cooperating with a malicious homeserver could interfere with the verification flow between two users, injecting its own cross-signing user identity in place of one of the users’ identities. This would lead to the other device trusting/verifying the user identity under the control of the homeserver instead of the intended one. The vulnerability is a bug in the matrix-js-sdk, caused by checking and signing user identities and devices in two separate steps, and inadequately fixing the keys to be signed between those steps. Even though the attack is partly made possible due to the design decision of treating cross-signing user identities as Matrix devices on the server side (with their device ID set to the public part of the user identity key), no other examined implementations were vulnerable. Starting with version 19.7.0, the matrix-js-sdk has been modified to double check that the key signed is the one that was verified instead of just referencing the key by ID. An additional check has been made to report an error when one of the device ID matches a cross-signing key. As this attack requires coordination between a malicious homeserver and an attacker, those who trust their homeservers do not need a particular 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-5w8r-8pgj-5jmf

Advisories 19

References