Read the docs
TI-2026-66195 Aliases GHSA-5w5r-mf82-595p

Cap'n Proto has Undefined Behavior in constant::Reader and StructSchema

Priority LOW 38CWE-758Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

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` ```rust pub fn get(&self) -> Result<<T as Owned>::Reader<'static>> { // ... // UNSAFE: access `words` without validation } ``` ## `StructSchema::new` ```rust 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.

Why it matters now

Fix Fixed capnp (crates.io): 0.24.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—capnp (crates.io)before 0.24.00.24.0Patch availableGHSA-5w5r-mf82-595p
  • capnp (crates.io) Vendor— Affected before 0.24.0 Fixed in 0.24.0 Patch available GHSA-5w5r-mf82-595p

Remediation

  • Fix · GHSA-5w5r-mf82-595p capnp (crates.io) Fixed in 0.24.0 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-5w5r-mf82-595p

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences