CVE-2019-16143
Description
An issue was discovered in the blake2 crate before 0.8.1 for Rust. The BLAKE2b and BLAKE2s algorithms, when used with HMAC, produce incorrect results because the block sizes are half of the required sizes.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The blake2 Rust crate before 0.8.1 used incorrect block sizes for BLAKE2b/BLAKE2s when used with HMAC, producing invalid MAC outputs.
Vulnerability
Detail
The blake2 Rust crate (versions prior to 0.8.1) contains a critical flaw in its implementation of the BLAKE2b and BLAKE2s hash algorithms when used as the underlying hash function for Hash-based Message Authentication Code (HMAC). The root cause is that the internal block sizes used by these algorithms were set to half of the required sizes mandated by the HMAC specification [2]. This leads to incorrect computation of HMAC tags for any message and key combination.
Exploitation
An attacker can exploit this vulnerability without any privileges or user interaction, as the HMAC computation is performed on the server or client side. The attack vector is network-based, and the only prerequisite is a system using the vulnerable blake2 crate together with an HMAC implementation to process authentication tags. For example, a prototype mismatch was demonstrated where an empty key and empty message produced a digest completely different from the correct Go reference implementation [3].
Impact
Successful exploitation allows an attacker to bypass authentication mechanisms that rely on HMAC with BLAKE2. Since HMAC is commonly used for message integrity and authenticity in protocols such as TLS, JWT, or custom API authentication, an attacker could forge authentication tokens, tamper with messages, or impersonate legitimate parties. The CVSS score is 9.8 (Critical) due to the high impact on confidentiality, integrity, and availability [2].
Mitigation
The issue is fixed in version 0.8.1 of the blake2 crate, which corrects the block size constants to match the required values [2]. Users should update to at least 0.8.1 and rebuild all artifacts that depend on the crate. There is no known workaround other than upgrading, as the root cause is in the hash algorithm's block size parameters.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
blake2crates.io | < 0.8.1 | 0.8.1 |
Affected products
3- Rust/blake2 cratedescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-4x25-pvhw-5224ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-16143ghsaADVISORY
- github.com/RustCrypto/MACs/issues/19ghsaWEB
- github.com/RustCrypto/hashes/tree/master/blake2ghsaPACKAGE
- rustsec.org/advisories/RUSTSEC-2019-0019.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.