SEVERITY NOT PROVIDED

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

Published 2026-11-19 · Updated 2026-11-22

Summary

A flaw in ruma-identifiers-validation causes a panic when validating certain Matrix key IDs with overly long non-ASCII algorithm components. Developers using the affected crate should update their dependencies immediately.

Who is affected

Applications using ruma-identifiers-validation to validate Matrix key IDs are vulnerable to a denial of service if they process malformed key IDs where the algorithm part before the colon exceeds 255 bytes and contains non-ASCII characters. The vulnerability stems from an unvalidated assumption that this length would fit into a NonZeroU8.

Exploitability

The vulnerability allows for application crashes via panics when parsing specially crafted inputs. CVSS vector and EPSS data are not documented, and CISA KEV is no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-22. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
crates.io ruma-identifiers-validation >= 0.0.0-0, < 0.14.0 0.14.0 cargo update -p ruma-identifiers-validation --precise 0.14.0

FAQ

What causes the panic in ruma-identifiers-validation?

The panic occurs because the algorithm part of the key ID is longer than 255 bytes and contains non-ASCII characters, which violates an unvalidated assumption regarding NonZeroU8 sizing.

Which version fixes the vulnerability?

Version 0.14.0 of ruma-identifiers-validation contains the fix.

Is this vulnerability actively exploited in the wild?

No, CISA Known Exploited Vulnerabilities status is set to no.

Original advisory 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

Source records: RUSTSEC-2026-0589 (OSV.dev).