Rust rkyv Flaws Let Malicious Archives Trigger Memory Safety Errors
Vulnerability Disclosure · 4 sources · Updated 4mo ago · First seen Aug 4, 2026

Multiple vulnerabilities in the Rust serialization crate rkyv allow crafted untrusted archives to bypass validation in supposedly safe checked deserialization paths and trigger memory safety failures. RustSec advisories RUSTSEC-2026-0233, RUSTSEC-2026-0234, and RUSTSEC-2026-0235 describe flaws that can lead to a heap use-after-free in ArchivedString::deserialize, out-of-bounds reads in archives containing hash tables, and out-of-bounds reads involving Rc/Arc shared pointers. Affected safe APIs include rkyv::access and rkyv::from_bytes, and the resulting impact includes process crashes, denial of service, and potential memory exposure when applications process attacker-controlled archive bytes.
The issues were fixed in rkyv 0.8.17, which strengthens archive range validation, rejects malformed relative pointers and inconsistent hash table states, and hardens shared-pointer verification. An upstream code change shows the project now validates shared pointers using both erased data pointers and pointer metadata, explicitly detecting conflicting metadata such as forged slice lengths that reference the same memory region. The maintainers said the 0.7 series is also affected but unsupported, and advised users handling untrusted archives to upgrade to 0.8.17 or later.


