Cryptographic Issues Affecting sha2 package, versions >=0.9.7 <0.9.8


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.24% (62nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cryptographic Issues vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-SHA2-1584121
  • published10 Sept 2021
  • disclosed8 Sept 2021
  • creditUnknown

Introduced: 8 Sep 2021

CVE-2021-45696  (opens in a new tab)
CWE-310  (opens in a new tab)

How to fix?

Upgrade sha2 to version 0.9.8 or higher.

Overview

sha2 is a pure Rust implementation of the SHA-2 hash function family including SHA-224, SHA-256, SHA-384, and SHA-512.

Affected versions of this package are vulnerable to Cryptographic Issues. A new AVX2-accelerated backend was introduced in v0.9.7 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.

CVSS Scores

version 3.1