RustSec logo

History ⋅ Edit ⋅ JSON (OSV)

RUSTSEC-2026-0588

Validating Matrix Content URIs may panic

Reported
Issued
Package
ruma-identifiers-validation (crates.io)
Type
Vulnerability
Categories
References
Patched
  • >=0.13.0
Unaffected
  • <0.2.3
Affected Functions
Version
ruma_identifiers_validation::mxc_uri::validate
  • <0.13.0, >=0.2.3

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.

Advisory available under CC0-1.0 license.