CVE-2025-59160: matrix-js-sdk has insufficient validation when considering a room to be upgraded by another

Published Sep 16, 2025
·
Updated

Impact matrix-js-sdk before 38.2.0 has insufficient validation of room predecessor links in MatrixClient::getJoinedRooms, allowing a remote attacker to attempt to replace a tombstoned room with an unrelated attacker-supplied room.

Patches The issue has been patched and users should upgrade to 38.2.0.

Workarounds Avoid using MatrixClient::getJoinedRooms in favour of getRooms() and filtering upgraded rooms separately.

Other sources

Matrix JavaScript SDK is a Matrix Client-Server SDK for JavaScript and TypeScript. matrix-js-sdk before 38.2.0 has insufficient validation of room predecessor links in MatrixClient::getJoinedRooms, allowing a remote attacker to attempt to replace a tombstoned room with an unrelated attacker-supplied room. The issue has been patched and users should upgrade to 38.2.0. A workaround is to avoid using MatrixClient::getJoinedRooms in favor of getRooms() and filtering upgraded rooms separately.

MITRE

Affected Software

2 affected componentsFixes available
matrix Javascript SDK<38.2.0
npm/matrix-js-sdk<38.2.0
38.2.0

Event History

Sep 16, 2025
CVE Published
via MITRE·04:37 PM
Data Sourced
via MITRE·04:37 PM
DescriptionWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:18 PM
Data Sourced
via GitHub·08:18 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-59160?

CVE-2025-59160 has been rated as a moderate severity vulnerability due to insufficient validation of room predecessor links.

2

How do I fix CVE-2025-59160?

To fix CVE-2025-59160, update the Matrix JavaScript SDK to version 38.2.0 or later.

3

What type of vulnerability is CVE-2025-59160?

CVE-2025-59160 is a validation vulnerability affecting the Matrix JavaScript SDK.

4

Who is affected by CVE-2025-59160?

Users of Matrix JavaScript SDK versions below 38.2.0 are affected by CVE-2025-59160.

5

What can a remote attacker do with CVE-2025-59160?

A remote attacker can potentially replace a tombstoned room with an unrelated room due to insufficient link validation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203