CVE-2022-39251 json
Matrix Javascript SDK vulnerable to Olm/Megolm protocol confusion
published 4y ago modified 4mo ago also GHSA-r48r-j8fx-mq2c , EUVD-2022-6927
- 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 67%
- public exploits
- 0
- none known
Summary
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.
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-39251
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-39251
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Is CVE-2022-39251 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor 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-39251 updated cvss 7.5
Mozilla: Matrix SDK bundled with Thunderbird vulnerable to an impersonation attack
-
Red Hat Enterprise Linux 6 thunderbirdaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux AppStream (v. 8) thunderbird 102.4.0-1.el8_6fixed: vendor fix RHSA-2022:7190
-
Red Hat Enterprise Linux AppStream (v. 9) thunderbird 102.4.0-1.el9_0fixed: vendor fix RHSA-2022:7178
-
Red Hat Enterprise Linux AppStream E4S (v. 8.1) thunderbird 102.4.0-1.el8_1fixed: vendor fix RHSA-2022:7183
-
Red Hat Enterprise Linux AppStream EUS (v. 8.2) thunderbird 102.4.0-1.el8_2fixed: vendor fix RHSA-2022:7182
-
Red Hat Enterprise Linux AppStream EUS (v.8.4) thunderbird 102.4.0-1.el8_4fixed: 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_9fixed: 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
- last yr.
Exploit prediction
1.18% chance of exploitation in the next 30 days, higher than 67% of all scored CVEs (FIRST EPSS, 2026-11-09).
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
References
-
github.com
/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76
web, patch, third-party-advisory
-
security.gentoo.org
/glsa/202210-35
vendor-advisory, web, third-party-advisory
-
matrix.org
/blog/2022/09/28/upgrade-now-to-address-encryption-vulns-in-matrix-sdks-and-clients
web, vendor-advisory
-
github.com
/matrix-org/matrix-js-sdk/releases/tag/v19.7.0
web, release-notes, third-party-advisory
-
github.com
/matrix-org/matrix-js-sdk/security/advisories/GHSA-r48r-j8fx-mq2c
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-39251
advisory
-
github.com
/matrix-org/matrix-js-sdk
package
Sources
- CVE List CVE-2022-39251
- GitHub Advisory GHSA-r48r-j8fx-mq2c
- NVD CVE-2022-39251
Fencer Intel 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.