{"id":"CVE-2024-42369","aliases":["DEBIAN-CVE-2024-42369","EUVD-2024-2665","GHSA-vhr5-g3pm-49fm","UBUNTU-CVE-2024-42369","openSUSE-SU-2024:14288-1","openSUSE-SU-2024:14289-1"],"status":"published","title":"A room with itself as a its predecessor will freeze matrix-js-sdk","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","severity":{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00483,"percentile":0.41922,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-674"],"published":"2024-08-20T14:37:19Z","modified":"2026-10-28T02:30:29Z","fixes":[{"ecosystem":"npm","package":"matrix-js-sdk","fixed_in":["34.3.1"],"sources":["ghsa","osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"element-desktop","fixed_in":["1.11.75-1.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"element-web","fixed_in":["1.11.75-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"matrix-js-sdk","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"34.3.1"}]}]},{"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":"34.3.1"}]}]},{"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"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"element-desktop","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.11.75-1.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"element-web","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.11.75-1.1"}]}]}],"products":[{"vendor":"matrix","product":"javascript_sdk"},{"vendor":"matrix-org","product":"matrix-js-sdk"}],"references":[{"url":"https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-vhr5-g3pm-49fm","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/commit/a0efed8b881b3db6c9f2c71d6a6e74c2828978c6","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42369","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-vhr5-g3pm-49fm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42369.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-42369","tags":["advisory"]},{"url":"https://github.com/matrix-org/matrix-js-sdk","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2024-42369","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-42369","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2024-42369","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2024-42369","title":"A room with itself as a its predecessor will freeze matrix-js-sdk","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","status":"published","published":"2024-08-20T14:37:19.226Z","modified":"2024-09-03T17:06:42.231Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T14:34:03.00063Z"}],"euvd":[{"id":"EUVD-2024-2665","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","status":"published","published":"2024-08-20T14:37:19Z","modified":"2024-09-03T17:06:42Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-03T00:56:05.515988Z"}],"ghsa":[{"id":"GHSA-vhr5-g3pm-49fm","title":"matrix-js-sdk will freeze when a user sets a room with itself as a its predecessor","description":"### Impact\nA malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's `getRoomUpgradeHistory` function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug.\n\nEven if the CVSS score would be 4.1 ([AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L\u0026version=3.1)) we classify this as High severity issue.\n\n### Patches\nThis was patched in matrix-js-sdk 34.3.1.\n\n### Workarounds\nSanity check rooms before passing them to the matrix-js-sdk or avoid calling either `getRoomUpgradeHistory` or `leaveRoomChain`.\n\n### References\nN/A.\n","status":"published","published":"2024-08-20T18:35:27Z","modified":"2024-08-20T18:35:28Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L","level":"medium"},{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T14:37:59.336921Z"}],"nvd":[{"id":"CVE-2024-42369","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","status":"published","published":"2024-08-20T15:15:21.54Z","modified":"2026-06-17T07:49:20.483Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"primary"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T14:10:19.870727Z"}],"osv":[{"id":"CVE-2024-42369","title":"A room with itself as a its predecessor will freeze matrix-js-sdk","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","status":"published","published":"2024-08-20T14:37:19.226Z","modified":"2026-10-28T02:30:29.703177225Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T15:44:42.322107Z"},{"id":"DEBIAN-CVE-2024-42369","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","status":"published","published":"2024-08-20T15:15:21.54Z","modified":"2026-08-27T23:05:12.448482024Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:45:43.156294Z"},{"id":"GHSA-vhr5-g3pm-49fm","title":"matrix-js-sdk will freeze when a user sets a room with itself as a its predecessor","description":"### Impact\nA malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's `getRoomUpgradeHistory` function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug.\n\nEven if the CVSS score would be 4.1 ([AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L\u0026version=3.1)) we classify this as High severity issue.\n\n### Patches\nThis was patched in matrix-js-sdk 34.3.1.\n\n### Workarounds\nSanity check rooms before passing them to the matrix-js-sdk or avoid calling either `getRoomUpgradeHistory` or `leaveRoomChain`.\n\n### References\nN/A.\n","status":"published","published":"2024-08-20T18:35:27Z","modified":"2024-08-20T18:58:55.366577Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium"},{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L","level":"medium"}],"cwes":["CWE-674"],"updated_at":"2026-11-02T15:46:57.348035Z"},{"id":"UBUNTU-CVE-2024-42369","description":"matrix-js-sdk is a Matrix messaging protocol Client-Server SDK for JavaScript. A malicious homeserver can craft a room or room structure such that the predecessors form a cycle. The matrix-js-sdk's getRoomUpgradeHistory function will infinitely recurse in this case, causing the code to hang. This method is public but also called by the 'leaveRoomChain()' method, so leaving a room will also trigger the bug. This was patched in matrix-js-sdk 34.3.1.","status":"published","published":"2024-08-20T15:15:00Z","modified":"2025-10-24T05:11:47Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","level":"medium"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T16:54:58.679387Z"},{"id":"openSUSE-SU-2024:14288-1","title":"element-desktop-1.11.75-1.1 on GA media","description":"These are all security issues fixed in the element-desktop-1.11.75-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-08-27T00:00:00Z","modified":"2026-02-04T02:49:08.123331Z","updated_at":"2026-11-02T16:58:36.662953Z"},{"id":"openSUSE-SU-2024:14289-1","title":"element-web-1.11.75-1.1 on GA media","description":"These are all security issues fixed in the element-web-1.11.75-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-08-27T00:00:00Z","modified":"2026-02-04T02:52:52.127748Z","updated_at":"2026-11-02T16:58:36.662953Z"}]}}
