# RUSTSEC-2026-0235: Insufficient archive validation can cause out-of-bounds reads in archives containing Rc/Arc

> Attackers can craft malicious archives to trigger out-of-bounds reads via forged slice lengths in rkyv, potentially leaking memory or crashing applications.

- **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:** 13 May 2026

## What is RUSTSEC-2026-0235?

RUSTSEC-2026-0235 is a memory corruption vulnerability in rkyv, published on 13 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Shared pointer validation keyed already-validated pointees by their address and
type, but did not include pointer metadata. For unsized pointees, an archive
could therefore contain multiple `Rc`, `Arc`, or weak pointers that shared a
data address but used different metadata, such as different slice lengths.

Once the first pointer had been validated, later pointers to the same address
skipped pointee validation. The safe checked `rkyv::access` API could
consequently return a slice with a forged length, allowing safe indexing to
read out of bounds. The same validation bypass was reachable through checked
deserialization with `rkyv::from_bytes`.

Version 0.8.17 includes pointer metadata in shared pointer validation and
rejects conflicting metadata. The 0.7 series is also affected but is no
longer supported by upstream. Users who process untrusted archives should upgrade
to 0.8.17 or later.

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rkyv` | crates.io | From 0.7.0-pre.2 | 0.8.17 |

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

Upgrade rkyv to 0.8.17 or later.

## Is RUSTSEC-2026-0235 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: RUSTSEC-2026-0235 is a memory corruption vulnerability in rkyv, published on 13 May 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-0235 in the wild and no public exploit code.

Affected packages and fixed versions:
- rkyv (crates.io): affected from 0.7.0-pre.2; fixed in 0.8.17

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-0235/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0235/index.md)
```

## Sources

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

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