# RUSTSEC-2026-0318: Sending custom to-device messages may panics

- Database: RustSec
- Published: 2026-09-29
- Modified: 2026-10-01

## Also published as

- [GHSA-45PR-7VV7-F64M](https://cve.now/GHSA-45PR-7VV7-F64M.md) (GitHub)

## Affected versions

- matrix-sdk-crypto (crates.io): fixed in 0.19.0

## Description

Using the `IdentityBasedStrategy` setting when calling
`Device::encrypt_event_raw` or `OlmMachine::encrypt_content_for_devices` may
cause a panic if the recipient does not have cross-signing keys.

## References

- https://crates.io/crates/matrix-sdk-crypto
- https://rustsec.org/advisories/RUSTSEC-2026-0318.html
- https://github.com/matrix-org/matrix-rust-sdk/pull/6670
- https://github.com/matrix-org/matrix-rust-sdk/commit/01b45b51299821ab03fecf46741392780f118d49

Page: https://cve.now/RUSTSEC-2026-0318

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
