CVE-2021-45696
CRITICAL 9.8CVSS 3.1Incorrect hash in sha2
An issue was discovered in the sha2 crate 0.9.7 before 0.9.8 for Rust. Hashes of long messages may be incorrect when the AVX2-accelerated backend is used.
- Published
- 27 Dec 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-327
- Also known as
- GHSA-fc7x-2cmc-8j2gGHSA-xpww-g9jx-hp8rRUSTSEC-2021-0100
- Sources
- NVDJSONOSV GHSA-fc7x-2cmc-8j2gJSONOSV GHSA-xpww-g9jx-hp8rJSONOSV RUSTSEC-2021-0100JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | sha2_project | sha2cpe:2.3:a:sha2_project:sha2:0.9.7:*:*:*:*:rust:*:* |
= 0.9.7 | |
| OSV | crates.io | sha2 | >= 0.9.7, < 0.9.8 | 0.9.8 |
References
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/sha2/RUSTSEC-2021-0100.md · Third Party Advisory, WEB
- https://rustsec.org/advisories/RUSTSEC-2021-0100.html · Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2021-45696 · ADVISORY
- https://github.com/RustCrypto/hashes/pull/314 · WEB
- https://github.com/RustCrypto/hashes · PACKAGE
- https://crates.io/crates/sha2 · PACKAGE
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 27 Dec 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 17 Jun 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 8 Sep 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 6 Jan 2022)