CVE-2021-45709
Use of a Broken or Risky Cryptographic Algorithm in crypto2
An issue was discovered in the crypto2 crate through 2021-10-08 for Rust. During Chacha20 encryption and decryption, an unaligned read of a u32 may occur.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
An issue was discovered in the crypto2 crate through 2021-10-08 for Rust. During Chacha20 encryption and decryption, an unaligned read of a u32 may occur.
- Record
CVE-2021-45709- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-119
- Updated
- 2026-11-02
CVE List No score
An issue was discovered in the crypto2 crate through 2021-10-08 for Rust. During Chacha20 encryption and decryption, an unaligned read of a u32 may occur.
- Record
CVE-2021-45709- Updated
- 2026-11-02
EUVDEUVD-2022-0545 No score
An issue was discovered in the crypto2 crate through 2021-10-08 for Rust. During Chacha20 encryption and decryption, an unaligned read of a u32 may occur.
- Record
EUVD-2022-0545- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-9hfg-pxr6-q4vp
9.8
Use of a Broken or Risky Cryptographic Algorithm in crypto2
The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.
This affects Chacha20 encryption and decryption in crypto2.
- Record
GHSA-9hfg-pxr6-q4vp- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-pmcv-mgcf-rvxg No score
Non-aligned u32 read in Chacha20 encryption and decryption
The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.
This affects Chacha20 encryption and decryption in crypto2.
- Record
GHSA-pmcv-mgcf-rvxg- Updated
- 2026-11-02
OSVGHSA-9hfg-pxr6-q4vp
9.8
Use of a Broken or Risky Cryptographic Algorithm in crypto2
The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.
This affects Chacha20 encryption and decryption in crypto2.
- Record
GHSA-9hfg-pxr6-q4vp- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSVGHSA-pmcv-mgcf-rvxg No score
Non-aligned u32 read in Chacha20 encryption and decryption
The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.
This affects Chacha20 encryption and decryption in crypto2.
- Record
GHSA-pmcv-mgcf-rvxg- Updated
- 2026-11-02
OSVRUSTSEC-2021-0121 No score
Non-aligned u32 read in Chacha20 encryption and decryption
The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.
This affects Chacha20 encryption and decryption in crypto2.
- Record
RUSTSEC-2021-0121- Updated
- 2026-11-02
Affected products
Affected packages
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-45709 is a critical vulnerability (CVSS 9.8) in Crypto2 Project Crypto2, published October 8, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.78%, the 56th percentile. No source names a fixed version.
References
rustsec.org/advisories/RUSTSEC-2021-0121.html
raw.githubusercontent.com/rustsec/advisory-db/main/crates/crypto2/RUSTSEC-2021-0121.md
nvd.nist.gov/vuln/detail/CVE-2021-45709
github.com/shadowsocks/crypto2/issues/27
github.com/advisories/GHSA-9hfg-pxr6-q4vp
github.com/advisories/GHSA-pmcv-mgcf-rvxg
github.com/shadowsocks/crypto2
crates.io/crates/crypto2