Vulnerability DatabaseRUSTSEC-2021-0086

RUSTSEC-2021-0086
Rust vulnerability analysis and mitigation

Overview

RUSTSEC-2021-0086 (CVE-2021-45684) is a memory safety vulnerability discovered in the flumedb crate through version 2021-01-07 for Rust. The vulnerability involves potential reading from uninitialized memory locations in the read_entry function (RustSec Advisory).

Technical details

The vulnerability exists in both go_offset_log::read_entry() and offset_log::read_entry() methods. These functions create an uninitialized buffer and pass it to a user-provided function F. This is unsound because it allows safe Rust code to exhibit undefined behavior by reading from uninitialized memory. The issue specifically occurs when creating a buffer using Vec::with_capacity() and setting its length using unsafe { buf.set_len() } before properly initializing the contents (GitHub Issue).

Impact

The vulnerability could lead to undefined behavior when reading from uninitialized memory locations. This could potentially result in memory corruption, information leaks, or other security-related issues in applications using the affected versions of the flumedb crate (RustSec Advisory).

Exploitability

The vulnerability can be triggered when using the read_entry functions with user-provided code that attempts to read from the uninitialized buffer. This is particularly concerning as it breaks Rust's memory safety guarantees in what appears to be safe code (GitHub Issue).

Mitigation and workarounds

The recommended fix is to zero-initialize the newly allocated u8 buffer before calling read_at(), which prevents user-provided code from accessing uninitialized heap memory. Additionally, two nightly features are available for handling such cases: Initializer and read_buf (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

RUSTSEC-2026-0236HIGH7.5
  • Rust logoRust
  • viperjs
NoYesAug 06, 2026
RUSTSEC-2026-0232HIGH7.5
  • Rust logoRust
  • nostr-relay-pool
NoYesAug 01, 2026
RUSTSEC-2026-0231HIGH7.5
  • Rust logoRust
  • nostr-relay-pool
NoYesAug 01, 2026
RUSTSEC-2026-0230HIGH7.5
  • Rust logoRust
  • nostr
NoYesAug 01, 2026
CVE-2026-68930MEDIUM6.5
  • Rust logoRust
  • russh
NoYesAug 03, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management