RUSTSEC-2026-0001
Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM
Mitigation
- Upgrade rkyv to one of 0.7.46, 0.8.13 (or later in the same release line).
Who should check
- Projects that depend on crates.io package rkyv (>= 0.0.0-0, < 0.7.46; >= 0.8.0, < 0.8.13)
Vulnerability facts
- Affected
- rkyv >= 0.0.0-0, < 0.7.46; >= 0.8.0, < 0.8.13
- Fixed in
- 0.7.46, 0.8.13
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io rkyv | >= 0.0.0-0, < 0.7.46; >= 0.8.0, < 0.8.13 | 0.7.46, 0.8.13 | osv |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by RUSTSEC-2026-0001. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/RUSTSEC-2026-0001.md Affected: rkyv >= 0.0.0-0, < 0.7.46; >= 0.8.0, < 0.8.13 Fixed in: 0.7.46, 0.8.13 Steps: 1. Search this machine and project for rkyv (crates.io): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is RUSTSEC-2026-0001 being exploited?
There is no confirmed exploitation: RUSTSEC-2026-0001 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is RUSTSEC-2026-0001?
It has no CVSS score yet. Unknown.
Which versions are affected by RUSTSEC-2026-0001?
rkyv >= 0.0.0-0, < 0.7.46; >= 0.8.0, < 0.8.13.
Is there a fix for RUSTSEC-2026-0001?
Yes. Fixed in 0.7.46, 0.8.13. Upgrade rkyv to one of 0.7.46, 0.8.13 (or later in the same release line).
How do I check if I'm affected by RUSTSEC-2026-0001?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.