RUSTSEC-2026-0588: Validating Matrix Content URIs may panic
Unknown
- OSV id
- RUSTSEC-2026-0588
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| ruma-identifiers-validation Cargo |
>= 0.2.3, < 0.13.0 | 0.13.0 |
How to fix it
Upgrade ruma-identifiers-validation to 0.13.0 or later.
cargo update -p ruma-identifiers-validation --precise 0.13.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 mxc_uri::validate may panic if the server name part of the URI is larger
than 249 bytes. The affected versions assumed that the length of the first part
of the URI (mxc://{server_name}) would fit into a NonZeroU8, but the length
of the server name wasn't validated and the Matrix specification actually allows
the server name to have a maximum length of 261 bytes.
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.