Vulnerability DatabaseRUSTSEC-2021-0112

RUSTSEC-2021-0112
Rust vulnerability analysis and mitigation

Overview

The tectonic_xdv crate before version 0.1.12 for Rust contains a memory safety vulnerability where XdvParser::process() method creates an uninitialized buffer and passes it to user-provided Read implementation. This could lead to undefined behavior by allowing safe Rust code to read from uninitialized memory locations. The vulnerability was discovered in February 2021 by the Rust group at Georgia Tech (SSLAB).

Technical details

The vulnerability exists in the XdvParser::process() method where it creates a buffer using Vec::with_capacity() and sets its length using unsafe set_len() before properly initializing it. This uninitialized buffer is then passed to a user-provided Read implementation, which violates the safety requirements of the Read trait that requires buffers to be initialized before calling read() (SSLAB).

Impact

Reading from uninitialized memory locations can lead to undefined behavior in safe Rust code, potentially causing memory corruption, crashes, or other security issues (SSLAB).

Exploitability

The vulnerability requires providing a malicious Read implementation that attempts to read from the uninitialized portions of the buffer. While no known exploits exist in the wild, the issue is inherent in the code design (SSLAB).

Mitigation and workarounds

The recommended fix is to ensure buffers are properly initialized before being passed to Read implementations. A naive but safe approach is to zero-initialize the buffer, though this adds runtime performance overhead. As of February 2021, there was no ideal zero-cost fix available. Users should upgrade to version 0.1.12 or later which contains the fix (SSLAB).

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

CVE-2026-46369HIGH7.5
  • Rust logoRust
  • nimiq-blockchain
NoYesAug 12, 2026
CVE-2026-73430MEDIUM5.3
  • Rust logoRust
  • russh
NoYesAug 12, 2026
CVE-2026-73429MEDIUM5.3
  • Rust logoRust
  • yazi
NoYesAug 12, 2026
CVE-2026-73489MEDIUM4.3
  • Rust logoRust
  • russh
NoYesAug 13, 2026
RUSTSEC-2026-0256NONEN/A
  • Rust logoRust
  • circular-buffer
NoYesAug 11, 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