{"id":"UBUNTU-CVE-2025-59160","details":"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.","modified":"2025-10-24T05:23:36Z","published":"2025-09-16T17:15:00Z","upstream":["CVE-2025-59160"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-59160"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-59160"},{"type":"REPORT","url":"https://github.com/matrix-org/matrix-js-sdk/commit/43c72d5bf5e2d0a26b3b4f71092e7cb39d4137c4"},{"type":"REPORT","url":"https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-mp7c-m3rh-r56v"}],"affected":[{"package":{"name":"node-matrix-js-sdk","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/node-matrix-js-sdk@0.9.2-1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.2-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-matrix-js-sdk","binary_version":"0.9.2-1"},{"binary_name":"node-matrix-js-sdk","binary_version":"0.9.2-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-59160.json"}},{"package":{"name":"node-matrix-js-sdk","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/node-matrix-js-sdk@9.11.0+~cs9.9.16-1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.3.0+~cs9.9.16-2","9.11.0+~cs9.9.16-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-matrix-js-sdk","binary_version":"9.11.0+~cs9.9.16-1"},{"binary_name":"node-matrix-js-sdk","binary_version":"9.11.0+~cs9.9.16-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-59160.json"}},{"package":{"name":"node-matrix-js-sdk","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/node-matrix-js-sdk@9.11.0+~cs9.9.16-2?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["9.11.0+~cs9.9.16-2"],"ecosystem_specific":{"binaries":[{"binary_name":"libjs-matrix-js-sdk","binary_version":"9.11.0+~cs9.9.16-2"},{"binary_name":"node-matrix-js-sdk","binary_version":"9.11.0+~cs9.9.16-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-59160.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V4","score":"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"},{"type":"Ubuntu","score":"medium"}]}