Vulnerability RUSTSEC-2025-0143

Unknown
UNKNOWN RISK
Vulnerabilities without an assigned CVSS score. Severity is not determinable from available data.
10 months ago
December 24, 2025 at 12:00 PM UTC
Unsound APIs of public `constant::Reader` and `StructSchema`
0.0.1 - 0.23.2
0.0.1 - 0.23.2

Summary

Unsound APIs of public `constant::Reader` and `StructSchema`

Details

The safe API functions constant::Reader::get and StructSchema::new rely on PointerReader::get_root_unchecked, which can cause undefined behavior (UB) by constructing arbitrary words or schemas.

Reader::get

pub fn get(&self) -> Result<<T as Owned>::Reader<'static>> {
    // ...
    // UNSAFE: access `words` without validation
}

StructSchema::new

pub fn new(builder: RawBrandedStructSchema) -> StructSchema {
    // ...
    // UNSAFE: access encoded nodes without validation
}

This vulnerability allows safe Rust code to trigger UB, which violates Rust's safety guarantees.

The issue is resolved in version 0.24.0 by making constructor functions unsafe and mark the fields of struct as visible only in the crate.

Impacted packages

Timeline

Published
10 months ago
December 24, 2025 at 12:00 PM UTC
Fixed (0.24.0)
10 months ago
December 24, 2025 at 08:20 PM UTC
Last Modified
9 months ago
January 29, 2026 at 06:11 AM UTC