CVE-2021-45709:
Use of a Broken or Risky Cryptographic Algorithm in crypto2
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.46164%
CWE
Published
1/6/2022
Updated
8/17/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
crypto2 | rust | <= 0.1.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The advisory explicitly lists these three functions in its [affected.functions] section. The vulnerability stems from improper use of std::slice::from_raw_parts_mut to create u32 slices from arbitrary u8 input without ensuring 4-byte alignment, violating Rust's safety contracts. The Chacha20 methods depend on xor_si512_inplace which contains the core unsafe operation. GitHub issue #27 confirms the alignment violation in xor_si512_inplace, and the CWE-119 classification matches the memory safety violation pattern.