# CVE-2026-45056: Matrix Rust SDK sender spoofing in Olm-encrypted to-device messages

Source: https://junglewise.ai/threats/cve-2026-45056-matrix-rust-sdk-sender-spoofing-in-olm-encrypted-to-device  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-11. Updated: 2026-06-04  
License: CC BY 4.0 with a link back

CVE-2026-45056 · Severity: medium · CVSS 4 · Published 2026-09-11

A security flaw in the Matrix Rust SDK's encryption component could allow a malicious server operator to impersonate other users. By exploiting a missing identity check during message decryption, an attacker could send forged private messages that appear to come from a trusted contact. This undermines the authenticity of communications within the Matrix messaging network.

Technologies: [matrix-sdk-crypto (crates.io)](https://junglewise.ai/threats/technologies/matrix-sdk-crypto). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2026-45056 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45056 being exploited in the wild.

**How severe is CVE-2026-45056?** Medium severity, with a CVSS score of 4, published 11 September 2026.

**Which products and versions are affected?** matrix-sdk-crypto (crates.io) >= 0.12.0, < 0.16.1, SEMVER:introduced=0.12.0,fixed=0.16.1.

**Is there a fix for CVE-2026-45056?** Yes. matrix-sdk-crypto (crates.io): upgrade to 0.16.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45056 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-45056?** Check whether you run matrix-sdk-crypto (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- matrix-sdk-crypto (crates.io): upgrade to 0.16.1 or later

  ```sh
  cargo update -p matrix-sdk-crypto
  ```


## Technical details

The matrix-sdk-crypto crate fails to validate the sender's user ID when decrypting Olm-encrypted to-device messages that include the sender_device_keys property. This vulnerability, classified as CWE-290 (Authentication Bypass by Spoofing), allows an attacker who controls or colludes with a homeserver operator to forge the origin of encrypted messages. The root cause is located in the decryption logic where the embedded device keys are not properly bound to the expected sender's identity. The issue is resolved in version 0.16.1 by implementing a mandatory check for the user ID in the embedded device keys.

## Affected products

- Matrix matrix-sdk-crypto >= 0.12.0, < 0.16.1

## Identifiers

- CVE-2026-45056
- GHSA-wfq4-36m3-9g42
- RUSTSEC-2026-0159

## Timeline

- 2026-05-08: patched: Fix merged in pull request 6553 and released in version 0.16.1
- 2026-06-03: disclosed: Initial disclosure by dkasak
- 2026-06-04: advisory: GitHub Advisory GHSA-wfq4-36m3-9g42 published

## References

- [https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-wfq4-36m3-9g42](https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-wfq4-36m3-9g42)
- [https://github.com/matrix-org/matrix-rust-sdk/pull/6553](https://github.com/matrix-org/matrix-rust-sdk/pull/6553)
- [https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.16.1](https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.16.1)
- [https://rustsec.org/advisories/RUSTSEC-2026-0159.html](https://rustsec.org/advisories/RUSTSEC-2026-0159.html)
- [https://api.github.com/repos/matrix-org/matrix-rust-sdk/security-advisories/GHSA-wfq4-36m3-9g42](https://api.github.com/repos/matrix-org/matrix-rust-sdk/security-advisories/GHSA-wfq4-36m3-9g42)

## Related threats

- [matrix-sdk-crypto panic in custom to-device message encryption](https://junglewise.ai/threats/rustsec-2026-0318-sending-custom-to-device-messages-may-panics-10c285de)
- [RUSTSEC-2025-0041 - matrix-sdk-crypto vulnerable to encrypted event sender spoofing by homeserver administrator](https://junglewise.ai/threats/cve-2025-48937-matrix-sdk-crypto-vulnerable-to-sender-of-encrypted-events-being)
- [RUSTSEC-2024-0356 - `UserIdentity::is_verified` not checking verification status of own user identity while performing the check](https://junglewise.ai/threats/cve-2024-40648-matrix-sdk-crypto-s-useridentity-is-verified-not-checking)
- [matrix-sdk-crypto contains a log exposure of private key of the server-side key backup](https://junglewise.ai/threats/cve-2024-34353-matrix-sdk-crypto-contains-a-log-exposure-of-private-key-of-the)
- [RUSTSEC-2024-0434 - Missing facility to signal rotation of a verified cryptographic identity](https://junglewise.ai/threats/cve-2024-52813-matrix-sdk-crypto-missing-facility-to-signal-rotation-of-a)
