CVE-2021-45696Sha2 Project Sha2
Critical 9.8 No auth needed
Follow: this CVE · Sha2 Project · Sha2 Project Sha2 We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 55
- Auth required
- No
- Published
- Dec 27, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-327
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Sha2.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| crates.io | sha2 |
≥ 0.9.7 < 0.9.8 |
0.9.8 |
cargo update -p sha2 --precise 0.9.8 |
| crates.io | sha2 |
≥ 0.9.7 < 0.9.8 |
0.9.8 |
cargo update -p sha2 --precise 0.9.8 |
| crates.io | sha2 |
≥ 0.9.7 < 0.9.8 |
0.9.8 |
cargo update -p sha2 --precise 0.9.8 |
Per OSV / GitHub Advisories (GHSA-fc7x-2cmc-8j2g, GHSA-xpww-g9jx-hp8r, RUSTSEC-2021-0100). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| sha2_project | sha2 | 0.9.7 |
Official sources
References
Links published by the sources. Open them with care.
- raw.githubusercontent.com Third Party Advisory
- rustsec.org Third Party Advisory