CVE-2022-39250

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.

Severity
HIGH
CVSS v3
8.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N · source cna
Exploit chance (EPSS)
1.186%
chance of exploitation in the next 30 days
higher than 68.4% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationnone
Automatableyes
Technical impactpartial
Scored2025-04-23

Timeline

  1. 2022-09-29Published by the CNA00:00 UTC
  2. 2022-09-30GitHub advisory published (GHSA-5w8r-8pgj-5jmf)1 day after publication
  3. 2025-04-23CISA SSVC decision recorded937 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-5w8r-8pgj-5jmf, affected packages:

PackageVulnerable versionsFixed in
npm matrix-js-sdkbefore 19.7.019.7.0

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
matrix javascript_sdkbefore 19.7.0fixed in 19.7.019.7.0

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources