Skip to content
Fencer Vulns
high 8.6

CVE-2022-39250 json

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

published 2022-09-29 4 y ago modified 2026-06-17 4 mo ago also GHSA-5w8r-8pgj-5jmf , EUVD-2022-6713

cvss
8.6
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.2%
EPSS 1.2% chance of exploitation in 30 days, percentile 68%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm matrix-js-sdk 19.7.0
  • matrix javascript_sdk 19.7.0
  • thunderbird Ubuntu 18.04 LTS 1:102.4.2+build2-0ubuntu0.18.04.1
  • thunderbird Ubuntu 20.04 LTS 1:102.4.2+build2-0ubuntu0.20.04.1
  • thunderbird Ubuntu 22.04 LTS 1:102.4.2+build2-0ubuntu0.22.04.1

ubuntu advisories UBUNTU-CVE-2022-39250

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • thunderbird RHEL 9 102.4.0-1.el9_0
  • thunderbird RHEL 7 102.4.0-1.el7_9
  • thunderbird RHEL 8 102.4.0-1.el8_6
  • thunderbird RHEL 8.4 EUS 102.4.0-1.el8_4
  • thunderbird RHEL 8.1 E4S 102.4.0-1.el8_1
  • thunderbird RHEL 8.2 EUS 102.4.0-1.el8_2

red hat advisories RHSA-2022:7178RHSA-2022:7181RHSA-2022:7184RHSA-2022:7183RHSA-2022:7190RHSA-2022:7182

  • MozillaThunderbird SLE Workstation Extension 15 SP4, SLE Workstation Extension 15 SP3, SLE Module for Package Hub 15 SP4 +3 more 102.4.0-150200.8.85.1

suse advisories SUSE-SU-2022:3800-1

  • element-desktop openSUSE Tumbleweed 1.11.8-1.1
  • element-web openSUSE Tumbleweed 1.11.8-1.1
  • MozillaThunderbird openSUSE Tumbleweed 102.3.1-1.1

opensuse advisories openSUSE-SU-2024:12374-1openSUSE-SU-2024:12375-1openSUSE-SU-2024:12379-1

  • thunderbird AlmaLinux 9 102.4.0-1.el9_0.alma
  • thunderbird AlmaLinux 8 102.4.0-1.el8_6.alma

almalinux advisories ALSA-2022:7178ALSA-2022:7190

  • thunderbird Rocky Linux 8 102.4.0-1.el8_6
  • thunderbird Rocky Linux 8 102.4.0-1.el8_6.0.1

rocky linux advisories RLSA-2022:7190

  • riot-web Alpine 3.17, Alpine 3.16 1.11.7-r0
  • element-web Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 1.11.7-r0

alpine advisories ALPINE-CVE-2022-39250

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-39250 updated cvss 7.5

Mozilla: Matrix SDK bundled with Thunderbird vulnerable to a device verification attack

  • Red Hat Enterprise Linux 6 thunderbird
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 8) thunderbird 102.4.0-1.el8_6
    fixed: vendor fix RHSA-2022:7190
  • Red Hat Enterprise Linux AppStream (v. 9) thunderbird 102.4.0-1.el9_0
    fixed: vendor fix RHSA-2022:7178
  • Red Hat Enterprise Linux AppStream E4S (v. 8.1) thunderbird 102.4.0-1.el8_1
    fixed: vendor fix RHSA-2022:7183
  • Red Hat Enterprise Linux AppStream EUS (v. 8.2) thunderbird 102.4.0-1.el8_2
    fixed: vendor fix RHSA-2022:7182
  • Red Hat Enterprise Linux AppStream EUS (v.8.4) thunderbird 102.4.0-1.el8_4
    fixed: vendor fix RHSA-2022:7181
  • Red Hat Enterprise Linux Client (v. 7) thunderbird 102.4.0-1.el7_9 Red Hat Enterprise Linux Server Optional (v. 7) thunderbird 102.4.0-1.el7_9 Red Hat Enterprise Linux Workstation (v. 7) thunderbird 102.4.0-1.el7_9
    fixed: vendor fix RHSA-2022:7184

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
partial
Assessed
18 mo ago

Exploit prediction

1.19% chance of exploitation in the next 30 days, higher than 68% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 8.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHub 3.1 8.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
npm matrix-js-sdk
<19.7.0
19.7.0

Affected products

  • matrix-org matrix-js-sdk

Classification

Weakness
  • CWE-322 Key Exchange without Entity Authentication
  • CWE-287 Improper Authentication

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.