RUSTSEC-2026-0589: Validating Matrix key IDs may panic
Unknown
- OSV id
- RUSTSEC-2026-0589
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| ruma-identifiers-validation Cargo |
>= 0.0.0-0, < 0.14.0 | 0.14.0 |
How to fix it
Upgrade ruma-identifiers-validation to 0.14.0 or later.
cargo update -p ruma-identifiers-validation --precise 0.14.0
- If it is an indirect dependency, `cargo update -p` still works; if a parent crate pins an older version, upgrade that crate.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
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
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: RustSec Advisory Database via OSV.dev (CC0 1.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.