CVE-2021-26305
Rust vulnerability analysis and mitigation

Overview

An issue was discovered in Deserializer::read_vec in the cdr crate before 0.2.4 for Rust. The vulnerability (CVE-2021-26305) involves passing an uninitialized buffer to a user-provided Read implementation, which could lead to unauthorized access to old contents of newly allocated heap memory (RUSTSEC Advisory, NVD).

Technical details

The vulnerability exists in the Deserializer::read_vec() function where it creates an uninitialized buffer and passes it to a user-provided Read implementation through Deserializer.reader.read_exact(). According to Rust's official documentation for the Read trait, passing an uninitialized buffer to an arbitrary Read implementation is defined as undefined behavior. The issue was fixed in version 0.2.4 by implementing zero-initialization of the newly allocated buffer before passing it to Deserializer.reader.read_exact() (RUSTSEC Advisory).

Impact

The vulnerability allows unauthorized access to the old contents of newly allocated heap memory, violating memory safety principles. The CVSS v3.1 base score is 9.8 (CRITICAL), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating high potential impact on confidentiality, integrity, and availability (NVD).

Exploitability

The vulnerability can be exploited through a user-provided Read implementation, requiring no special privileges or user interaction. The attack vector is network-accessible with low attack complexity (RUSTSEC Advisory).

Mitigation and workarounds

The vulnerability was fixed in cdr version 0.2.4 and later. Users should upgrade to this version or newer to address the issue. The fix involves zero-initializing newly allocated buffers before passing them to the Read implementation (RUSTSEC Advisory).

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