VDB

CVE-2022-39249

CVE-2022-39249 PUBLISHED CVSS 7.5 HIGH

Matrix Javascript SDK vulnerable to impersonation via forwarded Megolm sessions

Reported by github_m · Published September 28, 2022

matrix-js-sdk is fixed in 19.7.0 (npm)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
matrix-js-sdknpm19.7.0
thunderbirdAmazon Linux102.4.0-1.amzn2.0.1
riot-webAlpine1.11.7-r0

Risk scores

CVSS 3.1
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected products

VendorProductVersions
matrix-orgmatrix-js-sdk< 19.7.0
amazon:2thunderbird0
alpineriot-web0
matrix-orgmatrix-js-sdk0
npmmatrix-js-sdk0
alpineelement-web0

Timeline

  • Sep 28, 2022 CVE Published
  • Sep 29, 2022 EPSS Score (30 in total, the first dated here)
  • Sep 29, 2022 PoC Published (2 in total, the first dated here)
  • Dec 6, 2022 CVE Updated
  • Mar 9, 2026 Security Advisory (9 in total, the first dated here)
  • Mar 17, 2026 Distribution Patch (7 in total, the first dated here)
  • Jun 17, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-39249
vulnetix vdb fixes CVE-2022-39249

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-39249/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›