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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.1
- **CVSS:** 4.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:N/A:L`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: None; Integrity impact: None; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.67% (percentile 47, 2026-11-26)
- **CWE:** CWE-674
- **Aliases:** GHSA-vhr5-g3pm-49fm
- **Published:** 2024-08-20T14:37:19.226Z
- **Modified:** 2026-06-17T07:49:20.483Z

## Who should check

- Projects that depend on npm package matrix-js-sdk (\< 34.3.1)
- Anyone running matrix-org matrix-js-sdk \< 34.3.1

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

## Affected and fixed versions

- npm `matrix-js-sdk`: affected \< 34.3.1; fixed 34.3.1 (osv)
- matrix-org matrix-js-sdk: \< 34.3.1 (cvelist)

## Mitigation

- Upgrade matrix-js-sdk to 34.3.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42369. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42369.md
Affected: matrix-js-sdk < 34.3.1
Fixed in: 34.3.1

Steps:
1. Search this machine and project for matrix-js-sdk (npm), matrix-org matrix-js-sdk: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42369 being exploited?

There is no confirmed exploitation: CVE-2024-42369 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.67% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42369?

Medium: CVSS 4.1 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2024-42369?

matrix-js-sdk \< 34.3.1.

### Is there a fix for CVE-2024-42369?

Yes. Fixed in 34.3.1. Upgrade matrix-js-sdk to 34.3.1 or later.

### How do I check if I'm affected by CVE-2024-42369?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-vhr5-g3pm-49fm>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-42369>
- patch: <https://github.com/matrix-org/matrix-js-sdk/commit/a0efed8b881b3db6c9f2c71d6a6e74c2828978c6>
- other: <https://github.com/matrix-org/matrix-js-sdk>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42369>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-vhr5-g3pm-49fm> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-42369> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42369>
