{"id":"CVE-2025-59160","aliases":["CVE-2025-59160","GHSA-mp7c-m3rh-r56v"],"related":[],"kind":"vulnerability","state":"published","title":"matrix-js-sdk has insufficient validation when considering a room to be upgraded by another","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\nmatrix-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.\n\n### Patches\nThe issue has been patched and users should upgrade to 38.2.0.\n\n### Workarounds\nAvoid using `MatrixClient::getJoinedRooms` in favour of `getRooms()` and filtering upgraded rooms separately.","format":"markdown","source":"ghsa"}],"published":"2025-09-16T16:37:54.185Z","modified":"2026-06-17T09:45:38.993Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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/E:U","score":2.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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/E:U","score":2.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"}],"cwes":["CWE-20","CWE-345","CWE-862"],"affected":[{"ranges":[{"version":"< 38.2.0","status":"affected"}],"vendor":"matrix-org","product":"matrix-js-sdk","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"38.2.0"}],"ecosystem":"npm","package":"matrix-js-sdk","purl":"pkg:npm/matrix-js-sdk","source":"ghsa"}],"references":[{"url":"https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-mp7c-m3rh-r56v","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/commit/43c72d5bf5e2d0a26b3b4f71092e7cb39d4137c4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59160","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/matrix-org/matrix-js-sdk","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/releases/tag/v38.2.0","tags":["web"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/package/matrix-js-sdk/v/38.2.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-09-16T17:29:36.994Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-59160","url":"https://www.cve.org/CVERecord?id=CVE-2025-59160","licence":"CVE Terms of Use","modified":"2025-09-16T18:26:33.217Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mp7c-m3rh-r56v","url":"https://github.com/advisories/GHSA-mp7c-m3rh-r56v","licence":"CC-BY-4.0","modified":"2025-09-22T22:59:23.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-59160","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59160","licence":"Public domain","modified":"2026-06-17T09:45:38.993Z"}],"updatedAt":"2026-11-25T22:59:04.750Z","epss":{"score":0.00243,"percentile":0.1661,"date":"2026-12-01T12:00:22.000Z"}}