# CVE-2021-45696: Incorrect hash in sha2

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.83%, higher than 58% of CVEs (2026-12-01)
- Published: 2021-09-08T12:00:00.000Z
- Modified: 2026-06-17T04:13:57.980Z
- Also known as: GHSA-fc7x-2cmc-8j2g, GHSA-xpww-g9jx-hp8r, RUSTSEC-2021-0100
- Weaknesses: CWE-327
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- sha2 (crates.io): from 0.9.7 before 0.9.8
- sha2_project sha2: 0.9.7

## Every score

- GitHub: 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`
- GitHub: rating High
- NVD: 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`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://rustsec.org/advisories/RUSTSEC-2021-0100.html> (advisory, third-party-advisory, web)
- <https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/sha2/RUSTSEC-2021-0100.md> (third-party-advisory, web)
- <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)

## Sources

- CVE List: [CVE-2021-45696](https://www.cve.org/CVERecord?id=CVE-2021-45696), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-fc7x-2cmc-8j2g](https://github.com/advisories/GHSA-fc7x-2cmc-8j2g), CC-BY-4.0, modified 2023-11-08
- GitHub Advisory Database: [GHSA-xpww-g9jx-hp8r](https://github.com/advisories/GHSA-xpww-g9jx-hp8r), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2021-0100](https://rustsec.org/advisories/RUSTSEC-2021-0100.html), CC0-1.0, modified 2023-11-08
- NVD: [CVE-2021-45696](https://nvd.nist.gov/vuln/detail/CVE-2021-45696), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-45696 · Whole record: https://cve.day/CVE-2021-45696.json · Rebuilt by cve.day 2026-11-25T22:58:06.266Z
