CVE-2026-8720 - wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard MAC verification bypass
CVE ID + Title + Severity + Publication Date
- CVE ID: CVE-2026-8720
- Title: wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard MAC verification bypass
- Severity: High (CVSS v3.1 score 7.5)
- Publication date: 2026-06-25
- Affected tech stack: native C/C++ library
- Revenue tags: sellable_to_fintech, enterprise_blocker, zero_day_gold
One-sentence business risk
High MAC verification bypass in wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard can turn a routine dependency or application endpoint into data theft, account takeover, service outage, or code execution risk that blocks production releases and customer renewals.
Root cause and affected versions
wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard the message when the key length exceeds the block size, producing a MAC that is independent of the input. When the supplied key is longer than the BLAKE2 block size the key-hashing branch reinitialized the running hash state, discarding the accumulated message data, so the resulting MAC depended only on the key and not on the message being authenticated. This bug is specific to the HMAC-BLAKE2 APIs that were added in wolfSSL version 5.9.0.
- Vulnerable range: See vendor advisory and package manager resolution for the affected range.
- Fixed or mitigated range: Upgrade to the first vendor-fixed release or apply the referenced patch/backport.
- Public exploit/PoC status: Treat as public or reproducible when the advisory references a GitHub issue, exploit repository, VulnCheck entry, Wordfence entry, or public PoC. Validate only in isolated test environments.
Exact vulnerable code pattern
/* CVE-2026-8720: validation accepts mismatched or truncated security context. */
if (provided_len <= expected_len && memcmp(provided, expected, provided_len) == 0) {
return VERIFY_OK;
}
Fixed / mitigated code pattern
if (provided_len != expected_len || expected_len == 0) {
return VERIFY_FAIL;
}
if (CRYPTO_memcmp(provided, expected, expected_len) != 0) {
return VERIFY_FAIL;
}
return verify_context_binding(session, sni, alpn, certificate_constraints);
Step-by-step integration guide
- Inventory every direct and transitive use of
wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discardwith package manifests, lockfiles, SBOMs, container images, vendored source, firmware manifests, and deployment overlays. - Confirm whether the vulnerable path is reachable:
wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discardand attacker-controlled parameterinputare the first review anchors. - Upgrade to the vendor-fixed release or apply the referenced patch/backport; regenerate lockfiles, image digests, SBOMs, and deployment manifests.
- Patch owned code so untrusted input is validated before it reaches the vulnerable sink; use the fixed pattern above as the minimum implementation bar.
- Add a regression test that sends the advisory-shaped payload and proves the operation is rejected without corrupting memory, crossing trust boundaries, or changing privileged state.
- Run unit tests, integration tests for the affected route/parser/protocol, dependency audit, SAST rules for the sink class, and container or firmware build validation.
- Deploy through staged rollout with telemetry on rejected exploit-shaped inputs and a rollback plan that does not restore the vulnerable version.
Alternative mitigations
- Disable the affected endpoint, parser, protocol feature, plugin, decoder, runner option, or integration until the fixed build is live.
- Put a gateway/WAF rule in front of exposed HTTP paths to block advisory-shaped parameters while application code is patched.
- For native parsers and protocol libraries, isolate processing in a sandboxed worker with seccomp/AppArmor, memory limits, ASAN canaries in staging, and crash restart rate limits.
- For authz/authn flaws, require an additional server-side role check at the route/service layer and invalidate sessions or tokens touched during the vulnerable window.
- For supply-chain tooling, pin the fixed version in CI images and block vulnerable versions with dependency policy.
Detection signature
rg -n "wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard|CVE-2026-8720|wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard|input" . and add an integration test for the advisory-shaped input.
Copy-paste skill
You are remediating CVE-2026-8720: wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard MAC verification bypass.
Goal: produce a reviewer-ready PR that removes exposure to CVE-2026-8720, adds regression coverage, and documents deployment/operator checks.
Rules:
- Scope only CVE-2026-8720 and directly related `wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard` usage.
- Do not run public PoCs against production, shared staging, customer systems, or third-party infrastructure.
- Treat credentials, tokens, session data, private files, tenant IDs, and exploit samples as sensitive.
- Prefer the vendor-fixed release. Use a temporary mitigation only when upgrade is blocked and document the owner/date for removal.
- If this repository does not own an affected runtime, write `TRIAGE.md` with evidence instead of making unrelated edits.
Steps:
1. Search for `wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard`, `CVE-2026-8720`, vulnerable package names, `affected handlers`, and parameter `input`.
2. Identify every resolved vulnerable version in manifests, lockfiles, images, SBOMs, vendored code, and deployment templates.
3. Upgrade or patch to the fixed version: Upgrade to the first vendor-fixed release or apply the referenced patch/backport.
4. Replace the vulnerable code shape with input validation, parameterized APIs, strict bounds checks, canonical path checks, or explicit authz as appropriate.
5. Add a negative regression test for the advisory-shaped payload and a positive test for legitimate behavior.
6. Add detection from the signature section and document operator review for suspicious requests, crashes, privilege changes, or file writes.
7. Run the relevant test/build/audit commands and include outputs in the PR.
Stop and write `TRIAGE.md` if the affected runtime is not present, the fix requires production probing, or ownership of the vulnerable deployment is outside this repo.
Keywords and tags
- Keywords: CVE-2026-8720, wc_Blake2bHmacFinal and wc_Blake2sHmacFinal discard, MAC verification bypass, c/cpp, native C/C++ library
- Revenue tags: sellable_to_fintech, enterprise_blocker, zero_day_gold