VulnerabilityRUSTSEC-2026-0001 · rkyv
RUSTSEC-2026-0001: Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM
Short answerA security vulnerability in the rkyv crate: Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM. No severity score was published. Fixed in 0.7.46, 0.8.13: update to a fixed version.
| Crate | rkyv |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Before 0.7.46; from 0.8.0 before 0.8.13. |
| Fixed in | 0.7.46, 0.8.13 |
| Severity | not scored |
| Published | 2026-01-05 |
| Last changed | 2026-01-06 |
| Also known as | none |
What to do
- See which version you have:
cargo tree -i rkyv(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p rkyv. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplerkyv = "0.8.13") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
The SharedPointer::alloc implementation for sync::Arc<T> and rc::Rc<T> in rkyv/src/impls/alloc/rc/atomic.rs (and rc.rs) does not check if the allocator returns a null pointer on OOM (Out of Memory).
This null pointer can flow through to SharedPointer::from_value, which calls Box::from_raw(ptr) with the null pointer. This triggers undefined behavior when utilizing safe deserialization APIs (such as rkyv::from_bytes or rkyv::deserialize_using) if an OOM condition occurs during the allocation of the shared pointer.
The issue is reachable through safe code and violates Rust's safety guarantees.
References
- Package: crates.io/crates/rkyv
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0001.html
- Report: github.com/rkyv/rkyv/issues/644
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for rkyv
- Vulnerability HighRUSTSEC-2021-0054 · 2021-04-28Archives may contain uninitialized memory
- UnsoundRUSTSEC-2026-0122 · 2026-04-23Potential use-after-free due to lack of panic safety in `InlineVec::clear` and `SerVec::clear`
- VulnerabilityRUSTSEC-2026-0233 · 2026-05-11Crafted archives can cause a use-after-free during deserialization
- VulnerabilityRUSTSEC-2026-0234 · 2026-05-11Insufficient archive validation can cause out-of-bounds reads in archives containing hash tables
- VulnerabilityRUSTSEC-2026-0235 · 2026-05-13Insufficient archive validation can cause out-of-bounds reads in archives containing Rc/Arc
Up next
Same craterkyv: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?