CVE-2024-42369 A room with itself as a its predecessor will freeze matrix-js-sdk

Medium 4.1 Published Updated

A malicious homeserver can cause the Matrix JavaScript SDK to hang via infinite recursion when processing cyclic room structures, requiring an upgrade.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-42369?

CVE-2024-42369 is a medium-severity denial of service vulnerability in matrix-org matrix-js-sdk, published on 20 Aug 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-674

Which versions are affected by CVE-2024-42369?

2 open source packages ship an affected version, including matrix-js-sdk. It affects 1 product.

PackageAffectedFixed in
matrix-js-sdk npmAll versions34.3.1
matrix-js-sdk npmAll versions34.3.1
Linux distribution packages (2)
element-desktop openSUSE:TumbleweedAll versions1.11.75-1.1
element-web openSUSE:TumbleweedAll versions1.11.75-1.1

Products include Matrix Javascript Sdk.

How do I fix CVE-2024-42369?

Upgrade matrix-js-sdk to 34.3.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-42369 being exploited?

There is no known exploitation of CVE-2024-42369 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2024-42369, GHSA-vhr5-g3pm-49fm, UBUNTU-CVE-2024-42369, openSUSE-SU-2024:14288-1, openSUSE-SU-2024:14289-1.

Is CVE-2024-42369 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free