# matrix-sdk-crypto panic in custom to-device message encryption

Source: https://junglewise.ai/threats/rustsec-2026-0318-sending-custom-to-device-messages-may-panics-10c285de  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-29. Updated: 2026-10-02  
License: CC BY 4.0 with a link back

Severity: info · Published 2026-09-29

The matrix-sdk-crypto library, used for end-to-end encryption in Matrix chat applications, can crash unexpectedly when sending encrypted messages to users who lack cross-signing keys. An attacker could trigger this crash by simply not having the required keys configured, causing a denial of service that disrupts messaging functionality.

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

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 29 September 2026.

**Which products and versions are affected?** matrix-sdk-crypto (crates.io) SEMVER:introduced=0.0.0-0,fixed=0.19.0; Matrix.org Matrix-Sdk-Crypto before 0.19.0.

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

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run matrix-sdk-crypto (crates.io) or Matrix.org Matrix-Sdk-Crypto 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.19.0 or later

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


## Technical details

A panic occurs in the encrypt_event_raw and encrypt_content_for_devices functions when IdentityBasedStrategy is used and the recipient lacks cross-signing keys. This is an unhandled error condition that crashes the application. The vulnerability affects versions prior to 0.19.0.

## Affected products

- matrix-org matrix-sdk-crypto before 0.19.0

## Identifiers

- GHSA-45pr-7vv7-f64m
- RUSTSEC-2026-0318

## Timeline

- 2026-09-29: disclosed
- 2026-10-01: patched

## References

- [https://crates.io/crates/matrix-sdk-crypto](https://crates.io/crates/matrix-sdk-crypto)
- [https://rustsec.org/advisories/RUSTSEC-2026-0318.html](https://rustsec.org/advisories/RUSTSEC-2026-0318.html)

## Related threats

- [Matrix Rust SDK sender spoofing in Olm-encrypted to-device messages](https://junglewise.ai/threats/cve-2026-45056-matrix-rust-sdk-sender-spoofing-in-olm-encrypted-to-device)
- [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)
