# CVE-2025-59160: matrix-js-sdk has insufficient validation when considering a room to be upgraded by another

- Priority: **Routine**
- Reason: Not severe (CVSS 2.7, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-09-16 · Modified: 2025-09-16
- Aliases: UBUNTU-CVE-2025-59160, DEBIAN-CVE-2025-59160, GHSA-mp7c-m3rh-r56v
- Record: https://cvemate.com/vulnerability/CVE-2025-59160 · JSON: https://cvemate.com/vulnerability/CVE-2025-59160/json

## Description

```text
Matrix JavaScript SDK is a Matrix Client-Server SDK for JavaScript and TypeScript. 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. The issue has been patched and users should upgrade to 38.2.0. A workaround is to avoid using MatrixClient::getJoinedRooms in favor of getRooms() and filtering upgraded rooms separately.
```

## Signals

- CVSS: 2.7 low (v4.0, CVE.org) 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/E:U
- EPSS: 0.243%, percentile 16.566%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian node-matrix-js-sdk (Debian): All versions (No fix recorded)
- ubuntu node-matrix-js-sdk (Ubuntu): All versions (No fix recorded)
- matrix-org matrix-js-sdk: \< 38.2.0
- Npm matrix-js-sdk (Npm): \< 38.2.0

## References

- <https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-mp7c-m3rh-r56v>
- <https://github.com/matrix-org/matrix-js-sdk/commit/43c72d5bf5e2d0a26b3b4f71092e7cb39d4137c4>
- <https://ubuntu.com/security/CVE-2025-59160>
- <https://www.cve.org/CVERecord?id=CVE-2025-59160>
- <https://security-tracker.debian.org/tracker/CVE-2025-59160>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-59160>
- <https://github.com/matrix-org/matrix-js-sdk>
- <https://github.com/matrix-org/matrix-js-sdk/releases/tag/v38.2.0>
- <https://www.npmjs.com/package/matrix-js-sdk/v/38.2.0>

---

Data as of 2026-12-05T04:59:31.911Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
