
Cloud Vulnerability DB
A community-led vulnerabilities database
A heap-based buffer overflow vulnerability was discovered in the smallvec crate versions before 0.6.14 and 1.x before 1.6.1 for Rust. The vulnerability, tracked as RUSTSEC-2021-0003 (CVE-2021-25900), was identified on January 8, 2021, affecting the SmallVec::insert_many functionality (NVD, CVE Mitre).
The vulnerability occurs in the insert_many() function when an iterator yields more items than the lower bound of size_hint(). The issue stems from the buffer's length being set to 0 during the operation, causing the reserve(n) function to incorrectly handle capacity allocation. This leads to a potential buffer overflow condition as the subsequent code can write beyond the allocated buffer space (GitHub Issue).
When exploited, this vulnerability can lead to heap buffer overflow conditions, potentially causing memory corruption, program crashes, or in some cases, arbitrary code execution. The issue can result in undefined behavior even when using safe APIs of smallvec, potentially corrupting heap-allocated data structures (GitHub Issue).
The vulnerability can be triggered through safe Rust code, making it particularly concerning. A proof-of-concept exists demonstrating how the vulnerability can be exploited to cause memory corruption and program crashes using only safe APIs (GitHub Issue).
The vulnerability has been fixed in smallvec versions 0.6.14 and 1.6.1. Users are advised to upgrade to these or later versions to mitigate the risk (NVD).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."