CVE-2026-5477 Prefix-substitution forgery via integer overflow in wolfCrypt CMAC

High 8.2 Published Updated

An integer overflow in wolfCrypt CMAC allows attackers to forge authentication tags via prefix substitution, compromising data integrity.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-5477?

CVE-2026-5477 is a high-severity vulnerability in Wolfssl Wolfssl, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An integer overflow existed in the wolfCrypt CMAC implementation, that could be exploited to forge CMAC tags. The function wc_CmacUpdate used the guard `if (cmac->totalSz != 0)` to skip XOR-chaining on the first block (where digest is all-zeros and the XOR is a no-op). However, totalSz is word32 and wraps to zero after 2^28 block flushes (4 GiB), causing the guard to erroneously discard the live CBC-MAC chain state. Any two messages sharing a common suffix beyond the 4 GiB mark then produce identical CMAC tags, enabling a zero-work prefix-substitution forgery. The fix removes the guard, making the XOR unconditional; the no-op property on the first block is preserved because digest is zero-initialized by wc_InitCmac_ex.

Weakness: CWE-190

Which versions are affected by CVE-2026-5477?

It affects 1 product.

Products include Wolfssl Wolfssl.

How do I fix CVE-2026-5477?

Apply the vendor's patch.

Is CVE-2026-5477 being exploited?

There is no known exploitation of CVE-2026-5477 in the wild and no public exploit code.

All Wolfssl Wolfssl vulnerabilities

Sources

Also known as DEBIAN-CVE-2026-5477, GHSA-grqc-3vmg-p68x, JLSEC-2026-727, UBUNTU-CVE-2026-5477.

Is CVE-2026-5477 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free