CVE-2020-25793: Array size is not checked in sized-chunks
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.55097%
CWE
Published
8/25/2021
Updated
1/11/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 |
---|---|---|---|
sized-chunks | rust | < 0.6.3 | 0.6.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing capacity checks in three key areas:
- The From<InlineArray> implementation (CVE's primary focus) allows converting an InlineArray of any size to Chunk without validation.
- The unit() constructor creates single-element chunks without verifying capacity constraints.
- The pair() constructor creates two-element chunks without capacity checks. These are directly demonstrated in the test cases from GHSA-64gv-qg2v-vxv6 where U0 capacity chunks were overfilled. The RustSec advisory and CVE description explicitly call out these specific construction methods as vulnerable due to missing size validation (CWE-129).