Email me

Rust advisories / sha2

Vulnerability CriticalRUSTSEC-2021-0100 · sha2

RUSTSEC-2021-0100: Miscomputed results when using AVX2 backend

Short answerA security vulnerability in the sha2 crate: Miscomputed results when using AVX2 backend. GitHub rates it Critical. Fixed in 0.9.8: update to a fixed version.

Cratesha2
TypeVulnerability (crypto-failure)
Affected versionsFrom 0.9.7 before 0.9.8.
Fixed in0.9.8
SeverityCritical (GitHub rating)
Published2021-09-08
Last changed2023-11-08
Also known asCVE-2021-45696, GHSA-fc7x-2cmc-8j2g, GHSA-xpww-g9jx-hp8r

What to do

  1. See which version you have: cargo tree -i sha2 (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p sha2. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example sha2 = "0.9.8") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

The v0.9.7 release of the sha2 crate introduced a new AVX2-accelerated backend which was automatically enabled for all x86/x86_64 CPUs where AVX2 support was autodetected at runtime.

This backend was buggy and would miscompute results for long messages (i.e. messages spanning multiple SHA blocks).

The crate has since been yanked, but any users who upgraded to v0.9.7 should immediately upgrade to v0.9.8 and recompute any hashes which were previously computed by v0.9.7.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Same cratesha2: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ