{"id":"CVE-2024-42369","published":"2024-08-20T14:37:19Z","modified":"2024-09-03T17:06:42Z","title":"A room with itself as a its predecessor will freeze matrix-js-sdk","vendor":"matrix-org","product":"matrix-js-sdk","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00483,"percentile":0.42442,"provenance":"source"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"}],"references":[{"url":"https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-vhr5-g3pm-49fm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/matrix-org/matrix-js-sdk/commit/a0efed8b881b3db6c9f2c71d6a6e74c2828978c6","tags":["x_refsource_MISC"]}],"priority":{"score":11.4,"factors":[{"name":"EPSS percentile","points":8.49},{"name":"CVSS severity","points":2.87}]},"vendorSlug":"matrix-org","affectedVersions":[{"vendor":"matrix-org","product":"matrix-js-sdk","versions":["< 34.3.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-08-21T14:41:11.504953Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"matrix-js-sdk","vulnerableRanges":["<34.3.1"],"patched":["34.3.1"],"from":["GHSA-vhr5-g3pm-49fm"],"provenance":"source"}],"summary":{"text":"The flaw is in the getRoomUpgradeHistory function of matrix-js-sdk, a JavaScript Client-Server SDK for the Matrix messaging protocol, where a room whose predecessor chain forms a cycle causes uncontrolled recursion and a hang. An attacker operating a malicious homeserver can craft such a room structure, and because leaveRoomChain() also calls this function, a user who leaves the room can trigger the hang too, with the attacker needing network-level reach to the victim's client only through the homeserver and the victim needing to interact by leaving the room.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:00:19Z"},"euvd":{"id":"EUVD-2024-2665","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-39251","published":"2022-09-28","fixed":"19.7.0","kev":false},{"cve":"CVE-2023-28427","published":"2023-03-28","fixed":"24.0.0","kev":false},{"cve":"CVE-2023-29529","published":"2023-04-14","fixed":"24.1.0","kev":false},{"cve":"CVE-2024-42369","published":"2024-08-20","fixed":"34.3.1","kev":false},{"cve":"CVE-2024-47080","published":"2024-10-15","fixed":"34.8.0","kev":false,"link":{"from":"CVE-2024-42369","to":"CVE-2024-47080","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:matrix-js-sdk","fromFixed":"34.3.1","toFixed":"34.8.0","daysApart":56},{"kind":"same-code","provenance":"machine","files":["src/client.ts"],"commits":["https://github.com/matrix-org/matrix-js-sdk/commit/a0efed8b881b3db6c9f2c71d6a6e74c2828978c6","https://github.com/matrix-org/matrix-js-sdk/commit/2fb1e659c81f75253c047832dc9dcc2beddfac5f"],"basis":"shared file"}]}},{"cve":"CVE-2024-50336","published":"2024-11-12","fixed":"34.11.1","kev":false},{"cve":"CVE-2025-59160","published":"2025-09-16","fixed":"38.2.0","kev":false}],"package":"npm:matrix-js-sdk"}}