{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-5477","id":"CVE-2026-5477","title":"Prefix-substitution forgery via integer overflow in wolfCrypt CMAC","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 C","descriptionLong":"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.","published":"2026-04-10T05:06:22.884Z","updated":"2026-10-28T02:31:01.164846745Z","reserved":"2026-04-03T07:59:59.388Z","status":"Analyzed","rejected":false,"assigner":"wolfSSL","metric":{"version":"4.0","score":8.2,"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","rating":"high","source":"wolfSSL"},"metrics":[{"version":"4.0","score":8.2,"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","rating":"high","source":"wolfSSL"},{"version":"4.0","score":8.2,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"high","source":"wolfssl.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","rating":"high","source":"NVD"}],"rating":"high","products":["wolfSSL"],"affectedProducts":[{"vendor":"wolfSSL","product":"wolfSSL","defaultStatus":"unaffected","versions":[{"status":"affected","version":"0","lessThanOrEqual":"5.9.0","versionType":"semver"}],"platforms":[]}],"packages":[],"cwes":["CWE-190"],"aliases":[],"references":[{"url":"https://github.com/wolfSSL/wolfssl/pull/10102","tags":["Issue Tracking","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5477.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5477","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.00387,"epssPercentile":0.3339,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-5477","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5477","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-5477","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-5477","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}