# GHSA-45PR-7VV7-F64M: Sending custom to-device message panics when using IdentityBasedStrategy and recipient identity is missing

- Database: GitHub
- Severity: low (stated by ghsa, no CVSS score)
- Published: 2026-09-29
- Modified: 2026-09-29

## Affected versions

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

## Description

### Impact
Sending a custom to-device message (by calling `Device::encrypt_event_raw` or `OlmMachine::encrypt_content_for_devices` in `matrix-sdk-crypto`, or `encryption::Encryption::encrypt_and_send_raw_to_device` in `matrix-sdk`) can panic when using `IdentityBasedStrategy` if the recipient does not have cross-signing keys. This does not affect sending Megolm sessions to devices.

### Patches
This issue is fixed in `matrix-sdk-crypto` 0.19.0.

### Workarounds
Avoid using `IdentityBasedStrategy` when sending custom to-device messages.

### References
This issue was fixed in https://github.com/matrix-org/matrix-rust-sdk/pull/6670.

## References

- https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-45pr-7vv7-f64m

Page: https://cve.now/GHSA-45PR-7VV7-F64M

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