Vulnerability HighRUSTSEC-2021-0054 · rkyv
RUSTSEC-2021-0054: Archives may contain uninitialized memory
Short answerA security vulnerability in the rkyv crate: Archives may contain uninitialized memory. High severity (CVSS 7.5). Fixed in 0.6.0: update to a fixed version.
| Crate | rkyv |
|---|---|
| Type | Vulnerability (memory-exposure) |
| Affected versions | Before 0.6.0. |
| Fixed in | 0.6.0 |
| Severity | High, CVSS 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Published | 2021-04-28 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2021-31919, GHSA-w5cr-frph-hw7f |
| Affected functions | rkyv::Archive::resolve |
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.6.0") 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
rkyv is a serialization framework that writes struct-compatible memory to be stored or transmitted. During serialization, struct padding bytes and unused enum bytes may not be initialized. These bytes may be written to disk or sent over unsecured channels.
References
- Package: crates.io/crates/rkyv
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0054.html
- Report: github.com/djkoloski/rkyv/issues/113
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
- VulnerabilityRUSTSEC-2026-0001 · 2026-01-05Potential Undefined Behaviors in `Arc<T>`/`Rc<T>` impls of `from_value` on OOM
- 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?