# CVE-2021-31919: RUSTSEC-2021-0054 - Archives may contain uninitialized memory

Source: https://junglewise.ai/threats/cve-2021-31919-use-of-uninitialized-buffer-in-rkyv  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-04-28  
License: CC BY 4.0 with a link back

CVE-2021-31919 · Severity: low · CVSS 3.1 · Published 2021-04-28

Archives may contain uninitialized memory

Technologies: [rkyv (crates.io)](https://junglewise.ai/threats/technologies/rkyv). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2021-31919 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-31919 being exploited in the wild.

**How severe is CVE-2021-31919?** Low severity, with a CVSS score of 3.1, published 28 April 2021.

**Which products and versions are affected?** rkyv (crates.io) SEMVER:introduced=0,fixed=0.6.0, SEMVER:introduced=0.0.0-0,fixed=0.6.0.

**Is there a fix for CVE-2021-31919?** Yes. rkyv (crates.io): upgrade to 0.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-31919?** Check whether you run rkyv (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- rkyv (crates.io): upgrade to 0.6.0 or later

  ```sh
  cargo update -p rkyv
  ```


## Affected products

- rkyv (crates.io) SEMVER:introduced=0,fixed=0.6.0, SEMVER:introduced=0.0.0-0,fixed=0.6.0

## Identifiers

- CVE-2021-31919
- GHSA-w5cr-frph-hw7f
- RUSTSEC-2021-0054

## Related threats

- [rkyv memory corruption via panic-safety bugs in clear functions](https://junglewise.ai/threats/rkyv-memory-corruption-via-panic-safety-bugs-in-clear-functions-5d313d34)
- [RUSTSEC-2026-0235 - Insufficient archive validation can cause out-of-bounds reads in archives containing Rc/Arc](https://junglewise.ai/threats/rustsec-2026-0235-insufficient-archive-validation-can-cause-out-of-ced94533)
- [RUSTSEC-2026-0233 - Crafted archives can cause a use-after-free during deserialization](https://junglewise.ai/threats/rustsec-2026-0233-crafted-archives-can-cause-a-use-after-free-during-0be0b750)
- [RUSTSEC-2026-0234 - Insufficient archive validation can cause out-of-bounds reads in archives containing hash tables](https://junglewise.ai/threats/rustsec-2026-0234-insufficient-archive-validation-can-cause-out-of-d8f5fa22)
- [RUSTSEC-2026-0122 - Potential use-after-free due to lack of panic safety in `InlineVec::clear` and `SerVec::clear`](https://junglewise.ai/threats/rustsec-2026-0122-potential-use-after-free-due-to-lack-of-panic-safety-f2a16c90)
