CVE-2026-5477
published high CVSS 4.0 · 8.2Prefix-substitution forgery via integer overflow in wolfCrypt CMAC
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| wolfSSL | — | wolfSSL0 through 5.9.0 · Other versions: unaffected | Affected | Not stated | wolfSSL |
| Alpine Linux | edge | wolfssl | Fixed | 5.9.1-r0 | Package fix record |
| Alpine Linux | v3.23 | wolfssl | Fixed | 5.9.1-r0 | Package fix record |
| Alpine Linux | v3.24 | wolfssl | Fixed | 5.9.1-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.2 / 10
- Severity
- high
- Provider
- wolfSSL · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| wolfSSL | wolfSSL | 0 through 5.9.0 (affected · semver)Default: unaffected | wolfSSL · cna |
Weaknesses
1- CWE-190 CWE-190 Integer overflow or wraparound
References
1Provider assertions
2wolfSSL · cna
Prefix-substitution forgery via integer overflow in wolfCrypt CMAC
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f85f23fd94b96a0b4e1092815180da455f06b07a9005c0a2939d0dbeb1d7a391
- Ingested
- 23 Sep 2026, 09:23:13 UTC
- Source record
- Official CVE record