Lucene search

K
githubGitHub Advisory DatabaseGHSA-VHR5-G3PM-49FM
HistoryAug 20, 2024 - 6:35 p.m.

matrix-js-sdk will freeze when a user sets a room with itself as a its predecessor

2024-08-2018:35:27
CWE-674
GitHub Advisory Database
github.com
4
matrix-js-sdk
freeze
room predecessor loop
getroomupgradehistory
leaveroomchain
security issue
patch
workaround

CVSS3

5.3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

AI Score

6.9

Confidence

High

EPSS

0.001

Percentile

17.7%

Impact

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.

Even if the CVSS score would be 4.1 (AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L) we classify this as High severity issue.

Patches

This was patched in matrix-js-sdk 34.3.1.

Workarounds

Sanity check rooms before passing them to the matrix-js-sdk or avoid calling either getRoomUpgradeHistory or leaveRoomChain.

References

N/A.

Affected configurations

Vulners
Node
matrixmatrix-rust-sdkRange<34.3.1
VendorProductVersionCPE
matrixmatrix-rust-sdk*cpe:2.3:a:matrix:matrix-rust-sdk:*:*:*:*:*:*:*:*

CVSS3

5.3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

AI Score

6.9

Confidence

High

EPSS

0.001

Percentile

17.7%

Related for GHSA-VHR5-G3PM-49FM