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

- Severity: Low 2.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2025-09-16T16:37:54.185Z
- Modified: 2026-06-17T09:45:38.993Z
- Also known as: GHSA-mp7c-m3rh-r56v
- Weaknesses: CWE-20, CWE-345, CWE-862
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- matrix-org matrix-js-sdk: < 38.2.0
- matrix-js-sdk (npm): before 38.2.0

## Every score

- GitHub_M: CVSS:4.0 2.7 Low `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`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-mp7c-m3rh-r56v> (web)
- <https://github.com/matrix-org/matrix-js-sdk/commit/43c72d5bf5e2d0a26b3b4f71092e7cb39d4137c4> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-59160> (advisory)
- <https://github.com/matrix-org/matrix-js-sdk> (package)
- <https://github.com/matrix-org/matrix-js-sdk/releases/tag/v38.2.0> (web)
- <https://www.npmjs.com/package/matrix-js-sdk/v/38.2.0> (web)

## Sources

- CVE List: [CVE-2025-59160](https://www.cve.org/CVERecord?id=CVE-2025-59160), CVE Terms of Use, modified 2025-09-16
- GitHub Advisory Database: [GHSA-mp7c-m3rh-r56v](https://github.com/advisories/GHSA-mp7c-m3rh-r56v), CC-BY-4.0, modified 2025-09-22
- NVD: [CVE-2025-59160](https://nvd.nist.gov/vuln/detail/CVE-2025-59160), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-59160 · Whole record: https://cve.day/CVE-2025-59160.json · Rebuilt by cve.day 2026-11-25T22:59:04.750Z
