CVE-2021-45680: Out-of-bounds Write in vec-const
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.55713%
CWE
Published
1/6/2022
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
vec-const | rust | < 2.0.0 | 2.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improperly constructing a Vec from a const slice pointer. The advisory explicitly states the crate tried to create a Vec with nonzero capacity in const context, which is impossible as Vec requires heap allocation. The function responsible for this unsafe construction (likely from_raw_parts or similar) would be vulnerable. The high confidence comes from the advisory's technical description matching the pattern of unsafe Vec construction from raw pointers without proper allocator integration.