Vulnerability DatabaseRUSTSEC-2021-0008

RUSTSEC-2021-0008
Rust vulnerability analysis and mitigation

Overview

A memory safety vulnerability was discovered in the bra-rs crate for Rust, identified as RUSTSEC-2021-0008. The vulnerability involves unsound implementation in the GreedyAccessReader::fill_buf method where uninitialized buffers are passed to user-provided Read implementations, potentially leading to undefined behavior (SSLAB Issue).

Technical details

The vulnerability exists in the GreedyAccessReader::fill_buf method where it creates an uninitialized buffer and passes it to user-provided Read implementation (self.inner.read(buf)). This violates the safety requirements specified in the Read trait documentation, which explicitly states that it is the caller's responsibility to ensure the buffer is initialized before calling read. Using an uninitialized buffer can lead to undefined behavior in safe Rust code (SSLAB Issue).

Impact

The vulnerability could lead to undefined behavior in Rust programs using the affected crate, potentially causing memory safety issues and security vulnerabilities in applications that rely on this implementation (SSLAB Issue).

Exploitability

The issue affects version 0.1.0 of the bra crate and could be triggered when using the GreedyBufReader::fill_buf() functionality (SSLAB Issue).

Mitigation and workarounds

The suggested fix involves zero-initializing the newly allocated u8 buffer before calling read(), which prevents user-provided Read implementations from reading old contents of the newly allocated heap memory (SSLAB 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-0256NONEN/A
  • Rust logoRust
  • circular-buffer
NoYesAug 11, 2026
RUSTSEC-2026-0255NONEN/A
  • Rust logoRust
  • sized-chunks
NoNoAug 11, 2026
RUSTSEC-2026-0254NONEN/A
  • Rust logoRust
  • sp-sized-chunks
NoNoAug 11, 2026
RUSTSEC-2026-0252NONEN/A
  • Rust logoRust
  • orx-split-vec
NoYesAug 11, 2026
RUSTSEC-2026-0242NONEN/A
  • Rust logoRust
  • dcrypt-api
NoYesAug 09, 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