CVE-2025-59160: CWE-345: Insufficient Verification of Data Authenticity in matrix-org matrix-js-sdk
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.
AI Analysis
Technical Summary
CVE-2025-59160 is a vulnerability identified in the matrix-org matrix-js-sdk, a JavaScript and TypeScript SDK used for Matrix client-server communication. The issue exists in versions prior to 38.2.0 and relates to insufficient verification of room predecessor links within the MatrixClient::getJoinedRooms function. Specifically, the SDK fails to adequately validate the authenticity of data concerning room predecessor links, which allows a remote attacker to attempt to replace a tombstoned (archived or deprecated) room with an unrelated room that the attacker controls. This could potentially mislead clients about the state and history of chat rooms, causing confusion or manipulation of room membership and message context. The vulnerability is classified under CWE-345 (Insufficient Verification of Data Authenticity), indicating a failure to properly verify the authenticity of data inputs. The issue does not require authentication, user interaction, or privileges, and the attack vector is network-based. The vulnerability has been patched in version 38.2.0 of the SDK. As a workaround, users can avoid using the vulnerable MatrixClient::getJoinedRooms method and instead use getRooms() with separate filtering for upgraded rooms to mitigate the risk until they can upgrade. The CVSS 4.0 score is 2.7, reflecting a low severity due to limited impact on confidentiality, integrity, and availability, and the lack of known exploits in the wild at the time of publication.
Potential Impact
For European organizations using the matrix-js-sdk in their communication infrastructure, this vulnerability could allow attackers to manipulate the representation of chat rooms by substituting legitimate tombstoned rooms with attacker-controlled rooms. While the direct impact on confidentiality, integrity, and availability is limited, this manipulation could lead to misinformation, disruption of communication workflows, or social engineering attacks leveraging the altered room context. Organizations relying on Matrix for secure or sensitive communications might face risks of reduced trust in their messaging environment. However, given the low CVSS score and the absence of known active exploitation, the immediate risk is low. Nonetheless, organizations in sectors with high reliance on secure messaging, such as government, finance, or critical infrastructure, should consider the potential for targeted attacks aiming to exploit this vulnerability for subtle disruption or information manipulation.
Mitigation Recommendations
The primary mitigation is to upgrade the matrix-js-sdk to version 38.2.0 or later, where the vulnerability has been patched. Until an upgrade is feasible, developers should avoid using the MatrixClient::getJoinedRooms method and instead use getRooms() with manual filtering of upgraded rooms to prevent exploitation. Additionally, organizations should audit their use of the matrix-js-sdk in their applications to identify any reliance on the vulnerable function. Implementing monitoring for unusual room replacement or creation activities could help detect exploitation attempts. Incorporating integrity checks or additional verification layers on room data at the application level may further reduce risk. Regularly updating dependencies and SDKs, combined with secure coding practices around room management, will help prevent similar issues.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland
CVE-2025-59160: CWE-345: Insufficient Verification of Data Authenticity in matrix-org matrix-js-sdk
Description
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-59160 is a vulnerability identified in the matrix-org matrix-js-sdk, a JavaScript and TypeScript SDK used for Matrix client-server communication. The issue exists in versions prior to 38.2.0 and relates to insufficient verification of room predecessor links within the MatrixClient::getJoinedRooms function. Specifically, the SDK fails to adequately validate the authenticity of data concerning room predecessor links, which allows a remote attacker to attempt to replace a tombstoned (archived or deprecated) room with an unrelated room that the attacker controls. This could potentially mislead clients about the state and history of chat rooms, causing confusion or manipulation of room membership and message context. The vulnerability is classified under CWE-345 (Insufficient Verification of Data Authenticity), indicating a failure to properly verify the authenticity of data inputs. The issue does not require authentication, user interaction, or privileges, and the attack vector is network-based. The vulnerability has been patched in version 38.2.0 of the SDK. As a workaround, users can avoid using the vulnerable MatrixClient::getJoinedRooms method and instead use getRooms() with separate filtering for upgraded rooms to mitigate the risk until they can upgrade. The CVSS 4.0 score is 2.7, reflecting a low severity due to limited impact on confidentiality, integrity, and availability, and the lack of known exploits in the wild at the time of publication.
Potential Impact
For European organizations using the matrix-js-sdk in their communication infrastructure, this vulnerability could allow attackers to manipulate the representation of chat rooms by substituting legitimate tombstoned rooms with attacker-controlled rooms. While the direct impact on confidentiality, integrity, and availability is limited, this manipulation could lead to misinformation, disruption of communication workflows, or social engineering attacks leveraging the altered room context. Organizations relying on Matrix for secure or sensitive communications might face risks of reduced trust in their messaging environment. However, given the low CVSS score and the absence of known active exploitation, the immediate risk is low. Nonetheless, organizations in sectors with high reliance on secure messaging, such as government, finance, or critical infrastructure, should consider the potential for targeted attacks aiming to exploit this vulnerability for subtle disruption or information manipulation.
Mitigation Recommendations
The primary mitigation is to upgrade the matrix-js-sdk to version 38.2.0 or later, where the vulnerability has been patched. Until an upgrade is feasible, developers should avoid using the MatrixClient::getJoinedRooms method and instead use getRooms() with manual filtering of upgraded rooms to prevent exploitation. Additionally, organizations should audit their use of the matrix-js-sdk in their applications to identify any reliance on the vulnerable function. Implementing monitoring for unusual room replacement or creation activities could help detect exploitation attempts. Incorporating integrity checks or additional verification layers on room data at the application level may further reduce risk. Regularly updating dependencies and SDKs, combined with secure coding practices around room management, will help prevent similar issues.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-09-09T15:23:16.327Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68c993298d6281de8b72eaf8
Added to database: 9/16/2025, 4:41:13 PM
Last enriched: 9/16/2025, 4:41:30 PM
Last updated: 9/16/2025, 8:33:54 PM
Views: 8
Related Threats
CVE-2025-37125: Vulnerability in Hewlett Packard Enterprise (HPE) HPE Aruba Networking EdgeConnect SD-WAN Gateway
HighCVE-2025-37124: Vulnerability in Hewlett Packard Enterprise (HPE) HPE Aruba Networking EdgeConnect SD-WAN Gateway
HighCVE-2025-37123: Vulnerability in Hewlett Packard Enterprise (HPE) HPE Aruba Networking EdgeConnect SD-WAN Gateway
HighCVE-2025-43804: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Liferay Portal
MediumCVE-2025-37131: Vulnerability in Hewlett Packard Enterprise (HPE) HPE Aruba Networking EdgeConnect SD-WAN Gateway
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.