Vulnerability DatabaseRUSTSEC-2021-0040

RUSTSEC-2021-0040: 
Rust vulnerability analysis and mitigation

Overview

An issue was discovered in the arenavec crate through 2021-01-12 for Rust. A double drop can sometimes occur upon a panic in T::drop(). The vulnerability is tracked as RUSTSEC-2021-0040 and CVE-2021-29931 (NVD, RUSTSEC).

Technical details

The vulnerability is classified as a double free issue (CWE-415) that can occur in three different functions within the arenavec crate: common::Slice::new, common::SliceVec::resize_with, and common::SliceVec::resize. The issue manifests when a panic occurs within T::drop(), potentially leading to memory corruption. The vulnerability has received 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:N/A:H (NVD).

Impact

The vulnerability can lead to memory corruption through double free operations, which could potentially result in program crashes or undefined behavior. The CVSS scoring indicates that while there is no impact on confidentiality or integrity, there is a high impact on availability (NVD).

Exploitability

The vulnerability requires no privileges or user interaction to exploit, and can be triggered through network access. This is reflected in the CVSS metrics showing Network attack vector, Low attack complexity, and No privileges required (NVD).

Mitigation and workarounds

The suggested fixes include moving the res.len = len assignment to after all writes are completed in common::Slice::new, and moving self.slice.len = len to before drop_in_place() in both common::SliceVec::resize_with and common::SliceVec::resize functions (GitHub Issue).

Additional resources


Source: This report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-134056HIGH8.3
  • Rust logoRust
  • aws-lc-fips-sys
NoYesNov 23, 2026
GHSA-8wcq-xq25-7fhmMEDIUM6.5
  • Rust logoRust
  • cookie
NoYesNov 23, 2026
GHSA-2rx9-36wh-cm54MEDIUM5.3
  • Rust logoRust
  • gix
NoNoNov 23, 2026
GHSA-j5gm-p573-w4wqLOW2.2
  • Rust logoRust
  • gix
NoNoNov 23, 2026
GHSA-q7pr-3hx6-cgc4HIGHN/A
  • Rust logoRust
  • smallvec
NoNoNov 23, 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

Additional Wiz resources

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