# RUSTSEC-2026-0001: Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM

> Attackers can trigger undefined behavior and potential code execution or crashes by causing out-of-memory conditions during deserialization of shared pointers.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jan 2026

## What is RUSTSEC-2026-0001?

RUSTSEC-2026-0001 is a vulnerability in rkyv, published on 5 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

## Which versions are affected by RUSTSEC-2026-0001?

1 open source package ship an affected version, including rkyv.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rkyv` | crates.io | From 0.0.0-0 | 0.7.46, 0.8.13 |

## How do I fix RUSTSEC-2026-0001?

Upgrade rkyv to a fixed version for your release line: 0.7.46 or 0.8.13.

## Is RUSTSEC-2026-0001 being exploited?

There is no known exploitation of RUSTSEC-2026-0001 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for RUSTSEC-2026-0001 and fix it if it is affected.

What it is: RUSTSEC-2026-0001 is a vulnerability in rkyv, published on 5 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of RUSTSEC-2026-0001 in the wild and no public exploit code.

Affected packages and fixed versions:
- rkyv (crates.io): affected from 0.0.0-0; fixed in 0.7.46, 0.8.13

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/RUSTSEC-2026-0001/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0001/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/RUSTSEC-2026-0001

---
From sbomify Insights: https://insights.sbomify.com/RUSTSEC-2026-0001/
Summaries are generated and may contain mistakes; the official description above is the record.
