{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-72854","id":"CVE-2026-72854","title":"msgpack-c Integer Overflow in msgpack_unpacker_expand_buffer Causes a False-Success Undersized Reservation","description":"msgpack_unpacker_expand_buffer in src/unpack.c, reached through the public msgpack_unpacker_reserve_buffer API, computes its new buffer size using an unchecked size_t addition of the requested size and the amount already used. The doubling loop guards its own multiplication against overflow, but the addition in the loop condition is unguarded, so a request near SIZE_MAX wraps: the loop condition i","descriptionLong":"msgpack_unpacker_expand_buffer in src/unpack.c, reached through the public msgpack_unpacker_reserve_buffer API, computes its new buffer size using an unchecked size_t addition of the requested size and the amount already used. The doubling loop guards its own multiplication against overflow, but the addition in the loop condition is unguarded, so a request near SIZE_MAX wraps: the loop condition is already satisfied, the allocation is performed at the small pre-wrap size, and the function returns true. The caller is told the requested capacity was reserved when it was not, so a subsequent write of the requested length overflows the heap buffer. The library's own example/lib_buffer_unpack.c demonstrates the reserve-then-write pattern, and its defensive assert comparing capacity against the request is compiled out under NDEBUG. msgpack-c's own decode entry points do not derive the reservation size from untrusted input, so reaching this requires an integration that passes an attacker-influenced length to the reservation API, such as a length-prefixed streaming transport.","published":"2026-08-20T18:19:24.266Z","updated":"2026-10-28T02:30:54.369121032Z","reserved":"2026-08-10T15:16:31.371Z","status":"Deferred","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":5.8,"vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"medium","source":"VulnCheck"},"metrics":[{"version":"4.0","score":5.8,"vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"medium","source":"VulnCheck"},{"version":"4.0","score":5.8,"vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/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":"medium","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"unrated","source":"OSV"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"VulnCheck"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L","rating":"medium","source":"vulncheck.com"}],"rating":"medium","products":["msgpack-c"],"affectedProducts":[{"vendor":"msgpack","product":"msgpack-c","defaultStatus":"unaffected","versions":[{"version":"0","lessThanOrEqual":"7.0.1","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[],"cwes":["CWE-190","CWE-787"],"aliases":[],"references":[{"url":"https://github.com/msgpack/msgpack-c/issues/1181","tags":["issue-tracking","exploit","report"]},{"url":"https://github.com/msgpack/msgpack-c/blob/c-7.0.1/src/unpack.c#L429-L502","tags":["technical-description","article"]},{"url":"https://github.com/msgpack/msgpack-c/blob/c-7.0.1/include/msgpack/unpack.h#L219-L223","tags":["technical-description","article"]},{"url":"https://github.com/msgpack/msgpack-c/blob/c-7.0.1/example/lib_buffer_unpack.c","tags":["technical-description","article"]},{"url":"https://github.com/msgpack/msgpack-c","tags":["product","package"]},{"url":"https://www.vulncheck.com/advisories/msgpack-c-integer-overflow-in-msgpack-unpacker-expand-buffer-causes-a-false-success-undersized-reservation","tags":["third-party-advisory","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72854.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72854","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00157,"epssPercentile":0.0492,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-72854","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72854","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-72854","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-72854","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}