High severity · published Apr 10, 2026
CVE-2026-5477
Prefix-substitution forgery via integer overflow in wolfCrypt CMAC
7.5
CVSS
0.4%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 32% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
WO
wolfSSL · wolfSSL
through 5.9.0 · source: vendor, NVD
Affected product
WO
wolfSSL
wolfSSL
More from wolfSSL
9.8
CVE-2026-7531
Use-after-free in PQC hybrid key-share handling
9.8
CVE-2026-5264
DTLS 1.3 ACK heap buffer overflow
9.8
CVE-2026-5187
Heap Out-of-Bounds Write in DecodeObjectId() in wolfSSL
9.8
CVE-2026-4395
Heap-based buffer overflow in wc_ecc_import_x963_ex KCAPI path
9.8
CVE-2026-3849
Buffer Overflow in HPKE via Oversized ECH Config