Vulnerability · Published Apr 10, 2026 · Assigned by wolfSSL
CVE-2026-5477Prefix-substitution forgery via integer overflow in wolfCrypt CMAC
High 8.2
In plain English
A high-severity integer overflow in wolfSSL from wolfSSL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 32% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.23 | wolfssl | 5.9.1-r0 | ALPINE-CVE-2026-5477 |
| Alpine:v3.24 | wolfssl | 5.9.1-r0 | ALPINE-CVE-2026-5477 |
| Debian:12 | wolfssl | no fix listed | DEBIAN-CVE-2026-5477 |
| Debian:13 | wolfssl | no fix listed | DEBIAN-CVE-2026-5477 |
| Ubuntu:22.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2026-5477 |
| Ubuntu:24.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2026-5477 |
| Ubuntu:25.10 | wolfssl | no fix listed | UBUNTU-CVE-2026-5477 |
| Ubuntu:26.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2026-5477 |
| Ubuntu:26.10 | wolfssl | no fix listed | UBUNTU-CVE-2026-5477 |
Affected products (as reported)
Weakness: CWE-190 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N