CVE-2025-48937: matrix-sdk-crypto vulnerable to sender of encrypted events being spoofed by homeserver administrator
Summary matrix-sdk-crypto since version 0.8.0 up to 0.11.0 does not correctly validate the sender of an encrypted event. Accordingly, a malicious homeserver operator can modify events served to clients, making those events appear to the recipient as if they were sent by another user. Although the CVSS score is 4.9 (AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N), we consider this a High Severity security issue.
Published Jun 10, 2025 · Updated Jun 12, 2025
Affected packages
matrix-sdk-crypto
- Ecosystem
- Rust (crates.io)
- Affected
- >= 0.8.0, < 0.11.1
- Fixed in
- 0.11.1
- Check
cargo tree -i matrix-sdk-crypto
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
matrix-sdk-crypto since version 0.8.0 up to 0.11.0 does not correctly validate the sender of an encrypted event. Accordingly, a malicious homeserver operator can modify events served to clients, making those events appear to the recipient as if they were sent by another user.
Although the CVSS score is 4.9 (AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N), we consider this a High Severity security issue.
Details
The Matrix specification requires that clients ensure that "the event’s sender, room_id, and the recorded session_id match a trusted session". The vulnerable matrix-sdk-crypto versions check that the room_id matches that of the session denoted by session_id, but do not check the sender.
Patches
The issue is resolved by 13c1d20, included in versions 0.11.1 and 0.12.0 of matrix-sdk-crypto.
Workarounds
Since a successful attack requires administrator access to the homeserver, users who trust the administrators of their local homeserver are not affected.
References
- https://spec.matrix.org/v1.14/client-server-api/#mmegolmv1aes-sha2
Credited to dkasak, richvdh.
References
- https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-x958-rvg6-956w
- https://nvd.nist.gov/vuln/detail/CVE-2025-48937
- https://github.com/matrix-org/matrix-rust-sdk/commit/13c1d2048286bbabf5e7bc6b015aafee98f04d55
- https://github.com/matrix-org/matrix-rust-sdk/commit/56980745b4f27f7dc72ac296e6aa003e5d92a75b
- https://spec.matrix.org/v1.14/client-server-api/#mmegolmv1aes-sha2
- https://rustsec.org/advisories/RUSTSEC-2025-0041.html
- https://github.com/advisories/GHSA-x958-rvg6-956w
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesCVE-2026-45056
Matrix Rust SDK: Sender-binding gaps in to-device and room-key attribution
medium6.9Jun 4, 2026CVE-2024-52813
matrix-sdk-crypto missing facility to signal rotation of a verified cryptographic identity
medium4.3Jan 7, 2025CVE-2024-40648
matrix-sdk-crypto's `UserIdentity::is_verified` not checking verification status of own user identity while performing the check
medium4.8Jul 18, 2024CVE-2024-34353
matrix-sdk-crypto contains a log exposure of private key of the server-side key backup
medium5.5May 13, 2024
