Skip to content

RUSTSEC-2026-0001

Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM

Not rated yet crates.io
Severity
Not rated yet
No source has published a CVSS score yet
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
—
Not classified
Fix
0.8.13
Upgrade rkyv to this version or later

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 versions

crates.io

PackageVulnerableFixed in
rkyv
>= 0.0.0-0, < 0.7.46
>= 0.8.0, < 0.8.13
0.7.46
0.8.13

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

rkyv crates.io → 0.8.13

cargo
cargo update -p rkyv --precise 0.8.13

References

Timeline

  1. Published
  2. Last updated by the source
AdvisorySeverityWhy it's related
RUSTSEC-2026-0235
Insufficient archive validation can cause out-of-bounds reads in archives containing Rc/Arc
Not rated yet Also affects rkyv
RUSTSEC-2026-0234
Insufficient archive validation can cause out-of-bounds reads in archives containing hash tables
Not rated yet Also affects rkyv
RUSTSEC-2026-0233
Crafted archives can cause a use-after-free during deserialization
Not rated yet Also affects rkyv
GHSA-vfvv-c25p-m7mm
rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution
Medium Also affects rkyv
GHSA-w5cr-frph-hw7f
Use of uninitialized buffer in rkyv
High Also affects rkyv
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor