SEVERITY NOT PROVIDED

RUSTSEC-2026-0588: Validating Matrix Content URIs may panic

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

Summary

The ruma-identifiers-validation crate contains a vulnerability where validating Matrix content URIs can cause a program panic if the server name exceeds 249 bytes. Developers using this crate should update to the specified fixed version to prevent potential denial-of-service conditions.

Who is affected

The issue occurs when the `mxc_uri::validate` function processes a URI with a server name larger than 249 bytes, exceeding the assumption that the length fits into a `NonZeroU8`. This can lead to an unhandled panic, effectively crashing the application processing the URI. This vulnerability affects deployments that parse or validate user-supplied or network-provided Matrix URIs using the affected versions.

Exploitability

The exploitability is not documented as the CVSS vector, base score, and EPSS score are not provided. There is no evidence of active exploitation according to CISA KEV data.

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.2.3, < 0.13.0 0.13.0 cargo update -p ruma-identifiers-validation --precise 0.13.0

FAQ

What specifically triggers the panic?

The panic is triggered when the server name component of a Matrix 'mxc://' URI exceeds 249 bytes, violating internal assumptions about the length limit.

Is there a workaround if I cannot upgrade immediately?

Not documented; the recommended action is to update to the fixed version 0.13.0.

Does the Matrix specification allow these longer URIs?

Yes, the Matrix specification permits server names up to 261 bytes, which the affected versions of the crate failed to handle correctly.

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

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