Skip to content
OpenAdvisories
High · 7.5 CVE-2022-39249 EUVD-2022-6714GHSA-6263-x97c-c4gg

Matrix Javascript SDK vulnerable to impersonation via forwarded Megolm sessions

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 appearing to have come from another person. Such messages will be marked with a grey shield on some platforms, but this may be missing in others. This attack is possible due to the matrix-js-sdk implementing a too permissive key forwarding strategy on the receiving end. Starting with version 19.7.0, the default policy for accepting key forwards has been made more strict in the matrix-js-sdk. matrix-js-sdk will now only accept forwarded keys in response to previously issued requests and only from own, verified devices. The SDK now sets a `trusted` flag on the decrypted message upon decryption, based on whether the key used to decrypt the message was received from a trusted source. Clients need to ensure that messages decrypted with a key with `trusted = false` are decorated appropriately, for example, by showing a warning for such messages. This attack requires coordination between a malicious homeserver and an attacker, and those who trust your homeservers 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-6263-x97c-c4gg

Advisories 19

References