CVE-2026-6331: wolfSSL HMAC zero-length tag forgery in EVP_DigestVerifyFinal

CVE-2026-6331 · Severity: info · CVSS 2.1 · Published 2026-06-25

wolfSSL is a cryptographic library used to secure communications for embedded devices and cloud applications. A flaw in its OpenSSL-compatibility layer could allow an attacker to bypass security checks by providing an empty or shortened authentication tag during HMAC verification. This could lead to the acceptance of forged data that should have been rejected as untrusted.

Technologies: Wolfssl. Vendors: Wolfssl.

Quick answers

Is CVE-2026-6331 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-6331 being exploited in the wild.
How severe is CVE-2026-6331?
Informational severity, with a CVSS score of 2.1, published 25 June 2026.
Which products and versions are affected?
Wolfssl 3.15.5 to 5.9.1.
Is there a fix for CVE-2026-6331?
A patch was published on 2026-04-15: Fix merged via Pull Request 10192 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-6331 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-6331?
Check whether you run Wolfssl at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in wolfSSL's OpenSSL-compatibility layer within the EVP_DigestVerifyFinal function. The root cause is improper validation of the supplied signature length during HMAC verification; the code previously only checked that the supplied length did not exceed the maximum MAC length, rather than requiring an exact match. Consequently, a zero-length or truncated tag could be accepted as valid. An attacker could exploit this to forge HMAC tags, bypassing integrity protections. The issue is fixed in version 5.9.1 by enforcing that the supplied tag length exactly matches the expected MAC length and explicitly rejecting zero-length inputs.

Affected products

  • wolfSSL wolfSSL 3.15.5 to 5.9.1

Timeline

  • 2026-04-15: patched: Fix merged via Pull Request 10192
  • 2026-06-25: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.