GitHub Advisoryadvisory · npm

GHSA-mp7c-m3rh-r56v matrix-js-sdk has insufficient validation when considering a room to be upgraded by another

MEDIUM Published 2025-09-16 Modified 2025-09-22 Official page ↗
Aliases
CVE-2025-59160
Ecosystem
npm
Packages
matrix-js-sdk
Severity
Moderate
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Weaknesses
CWE-20, CWE-345, CWE-862
Reviewed
2025-09-16

Affected packages

• npm matrix-js-sdk: < 38.2.0 → fixed in 38.2.0

Description

Impact matrix-js-sdk before 38.2.0 has insufficient validation of room predecessor links in `MatrixClient::getJoinedRooms`, allowing a remote attacker to attempt to replace a tombstoned room with an unrelated attacker-supplied room. Patches The issue has been patched and users should upgrade to 38.2.0. Workarounds Avoid using `MatrixClient::getJoinedRooms` in favour of `getRooms()` and filtering upgraded rooms separately.

Related

Alias · CVE (1)

  • CVE-2025-59160 Matrix JavaScript SDK is a Matrix Client-Server SDK for JavaScript and TypeScript. vulnerability

Weakness · CWE (3)

  • CWE-20 Improper Input Validation weakness
  • CWE-345 Insufficient Verification of Data Authenticity weakness
  • CWE-862 Missing Authorization weakness

References