Vulnerability GHSA-5w5r-mf82-595p
Critical
CRITICAL RISK
CVSS Score: 9.5
Score Range: 9.0–10.0
Critical severity vulnerabilities (CVSS 9.0–10.0). These represent the highest impact issues.
9 months ago
January 28, 2026 at 04:06 PM UTC
Cap'n Proto has Undefined Behavior in constant::Reader and StructSchema
0.0.1 - 0.23.2
0.0.1 - 0.23.2
Summary
Cap'n Proto has Undefined Behavior in 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.
Related Vulnerabilities
Other vulnerabilities affecting the same packages
Unknown
10 months ago
Unsound APIs of public `constant::Reader` and `StructSchema`
0.0.1 - 0.23.2 RUSTSEC-2025-0143
0.0.1 - 0.23.2 RUSTSEC-2025-0143
Medium Risk
3 years ago
Cap'n Proto and its Rust implementation vulnerable to out-of-bounds read due to logic error handling list-of-list
0.0.1 - 0.13.6 and 0.14.0 - 0.14.10 and 0.15.0 - 0.15.1 GHSA-qqff-4vw4-f6hx
0.0.1 - 0.13.6 and 0.14.0 - 0.14.10 and 0.15.0 - 0.15.1 GHSA-qqff-4vw4-f6hx
Unknown
3 years ago
out-of-bounds read possible when setting list-of-pointers
0.0.1 - 0.13.6 and 0.14.0 - 0.14.10 and 0.15.0 - 0.15.1 RUSTSEC-2022-0068
0.0.1 - 0.13.6 and 0.14.0 - 0.14.10 and 0.15.0 - 0.15.1 RUSTSEC-2022-0068
Impacted packages
Timeline
Published
9 months ago
January 28, 2026 at 04:06 PM UTC
Fixed (0.24.0)
10 months ago
December 24, 2025 at 08:20 PM UTC
Last Modified
9 months ago
February 03, 2026 at 03:06 AM UTC