{"id":"CVE-2025-59160","aliases":["DEBIAN-CVE-2025-59160","EUVD-2025-29628","GHSA-mp7c-m3rh-r56v","UBUNTU-CVE-2025-59160"],"status":"published","title":"matrix-js-sdk has insufficient validation when considering a room to be upgraded by another","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.","severity":{"version":"4.0","score":2.7,"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","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00243,"percentile":0.15645,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-345","CWE-862"],"published":"2025-09-16T16:37:54Z","modified":"2026-10-28T02:31:15Z","fixes":[{"ecosystem":"npm","package":"matrix-js-sdk","fixed_in":["38.2.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"matrix-js-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"38.2.0"}]}]},{"source":"osv","ecosystem":"Debian:11","package":"node-matrix-js-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.11.0+~cs9.9.16-1","9.11.0+~cs9.9.16-2","9.3.0+~cs9.9.16-2","9.7.0~~rc1+~cs9.9.16-1","9.7.0~~rc1+~cs9.9.16-2"]},{"source":"osv","ecosystem":"npm","package":"matrix-js-sdk","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"38.2.0"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-matrix-js-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.2-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-matrix-js-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.3.0+~cs9.9.16-2","9.11.0+~cs9.9.16-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-matrix-js-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.11.0+~cs9.9.16-2"]}],"products":[{"vendor":"matrix-org","product":"matrix-js-sdk"}],"references":[{"url":"https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-mp7c-m3rh-r56v","tags":["x_refsource_CONFIRM","advisory","web","report"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/commit/43c72d5bf5e2d0a26b3b4f71092e7cb39d4137c4","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59160","tags":["advisory"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/releases/tag/v38.2.0","tags":["web"]},{"url":"https://www.npmjs.com/package/matrix-js-sdk/v/38.2.0","tags":["web"]},{"url":"https://github.com/advisories/GHSA-mp7c-m3rh-r56v"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59160.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-59160","tags":["advisory"]},{"url":"https://github.com/matrix-org/matrix-js-sdk","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2025-59160","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-59160","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2025-59160","title":"matrix-js-sdk has insufficient validation when considering a room to be upgraded by another","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.","status":"published","published":"2025-09-16T16:37:54.185Z","modified":"2025-09-16T18:26:33.217Z","cvss":[{"version":"4.0","score":2.7,"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","level":"low","assessor":"cna"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T14:32:47.812946Z"}],"euvd":[{"id":"EUVD-2025-29628","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.","status":"published","published":"2025-09-16T16:37:54Z","modified":"2025-09-16T18:26:33Z","cvss":[{"version":"4.0","score":2.7,"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","level":"low"}],"updated_at":"2026-11-02T20:31:42.601992Z"}],"ghsa":[{"id":"GHSA-mp7c-m3rh-r56v","title":"matrix-js-sdk has insufficient validation when considering a room to be upgraded by another","description":"### 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.","status":"published","published":"2025-09-16T20:18:57Z","modified":"2025-09-22T22:59:25Z","cvss":[{"version":"4.0","score":6.9,"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","level":"medium"}],"cwes":["CWE-20","CWE-345","CWE-862"],"updated_at":"2026-11-02T14:38:58.965005Z"}],"nvd":[{"id":"CVE-2025-59160","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.","status":"published","published":"2025-09-16T17:15:41.59Z","modified":"2026-06-17T09:45:38.993Z","cvss":[{"version":"4.0","score":2.7,"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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low","assessor":"secondary"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T14:11:29.650057Z"}],"osv":[{"id":"CVE-2025-59160","title":"matrix-js-sdk has insufficient validation when considering a room to be upgraded by another","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.","status":"published","published":"2025-09-16T16:37:54.185Z","modified":"2026-10-28T02:31:15.037585621Z","cvss":[{"version":"4.0","score":2.7,"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","level":"low"}],"cwes":["CWE-345"],"updated_at":"2026-11-02T15:44:51.190588Z"},{"id":"DEBIAN-CVE-2025-59160","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.","status":"published","published":"2025-09-16T17:15:41.59Z","modified":"2026-08-27T23:05:41.454090097Z","cvss":[{"version":"4.0","score":2.7,"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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low"}],"updated_at":"2026-11-02T15:45:47.697959Z"},{"id":"GHSA-mp7c-m3rh-r56v","title":"matrix-js-sdk has insufficient validation when considering a room to be upgraded by another","description":"### 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.","status":"published","published":"2025-09-16T20:18:57Z","modified":"2025-09-22T22:59:23Z","cvss":[{"version":"4.0","score":6.9,"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","level":"medium"}],"cwes":["CWE-20","CWE-345","CWE-862"],"updated_at":"2026-11-02T15:46:52.170928Z"},{"id":"UBUNTU-CVE-2025-59160","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.","status":"published","published":"2025-09-16T17:15:00Z","modified":"2025-10-24T05:23:36Z","cvss":[{"version":"4.0","score":2.7,"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","level":"low"}],"updated_at":"2026-11-02T16:55:50.817402Z"}]}}
