# RUSTSEC-2026-0589: Validating Matrix key IDs may panic

- Database: RustSec
- Published: 2026-11-19
- Modified: 2026-11-22

## Affected versions

- ruma-identifiers-validation (crates.io): fixed in 0.14.0

## Description

Using `key_id::validate` may panic if the `algorithm` part of the key ID is
longer than 255 bytes and contains non-ASCII characters. The affected versions
assumed that the length of the first part containing the encryption or signing
algorithm (the part before the colon) would fit into a `NonZeroU8`, but the
length of the first part wasn't validated.

## References

- https://crates.io/crates/ruma-identifiers-validation
- https://rustsec.org/advisories/RUSTSEC-2026-0589.html
- https://github.com/ruma/ruma/commit/b2cb9b43efbe082e4d9292560d4c9f0db5734038

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

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