Vulnerability DatabaseRUSTSEC-2020-0040

RUSTSEC-2020-0040
Rust vulnerability analysis and mitigation

Overview

An issue was discovered in the obstack crate before version 0.1.4 for Rust programming language. The vulnerability is tracked as RUSTSEC-2020-0040 and CVE-2020-35894, which was disclosed on December 31, 2020. The vulnerability affects the obstack project's crate implementation, specifically versions prior to 0.1.4 (NVD, RustSec).

Technical details

The vulnerability stems from incorrect padding calculation in the memory allocation process, which can result in unaligned references for types that require large alignment. The issue specifically occurs in the alloc function where the padding calculation is incorrect, using start_ptr as usize % alignment instead of the correct formula (alignment - (start_ptr % alignment)) % alignment. This implementation error leads to potential memory misalignment issues. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N (NVD).

Impact

The vulnerability can lead to unaligned memory references, particularly affecting types that require large alignment (such as types with #[repr(align(256))]). This misalignment can cause undefined behavior in Rust programs using the affected versions of the obstack crate, potentially leading to memory corruption or application crashes (GitHub Issue).

Exploitability

The vulnerability requires no special privileges or user interaction to exploit, as indicated by the CVSS metrics (PR:N/UI:N). The attack vector is network-accessible (AV:N), and the attack complexity is low (AC:L) (NVD).

Mitigation and workarounds

Users should upgrade to obstack version 0.1.4 or later, which contains the fix for this vulnerability. The fix involves correcting the padding calculation formula in the allocation function (RustSec).

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-68537HIGH7.5
  • Rust logoRust
  • fulgur
NoYesSep 17, 2026
CVE-2026-68523HIGH7.5
  • Rust logoRust
  • fulgur
NoYesSep 17, 2026
RUSTSEC-2026-0289NONEN/A
  • Rust logoRust
  • pqc_kyber
NoNoSep 17, 2026
RUSTSEC-2026-0287NONEN/A
  • Rust logoRust
  • cosmian_kyber
NoNoSep 17, 2026
RUSTSEC-2026-0286NONEN/A
  • Rust logoRust
  • cryptoki
NoYesSep 16, 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