CVE-2026-72854msgpack-c Integer Overflow in msgpack_unpacker_expand_buffer Causes a False-Success…
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.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | msgpack-c | Fix pending | UBUNTU-CVE-2026-72854 | |
| Ubuntu 26.04 | msgpack-c | Under investigation | UBUNTU-CVE-2026-72854 | |
| Ubuntu 24.04 | msgpack-c | Under investigation | UBUNTU-CVE-2026-72854 | |
| Ubuntu 22.04 | msgpack-c | Under investigation | UBUNTU-CVE-2026-72854 | |
| Ubuntu 20.04 | msgpack-c | Fix pending | UBUNTU-CVE-2026-72854 | |
| Ubuntu 18.04 | msgpack-c | Fix pending | UBUNTU-CVE-2026-72854 | |
| Debian 14 | msgpack-c | Fixed | 7.0.2-1 | DEBIAN-CVE-2026-72854 |
| Debian 13 | msgpack-c | Fix pending | DEBIAN-CVE-2026-72854 | |
| Debian 12 | msgpack-c | Fix pending | DEBIAN-CVE-2026-72854 |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- msgpack-c: affected: up to 7.0.1
References
- https://github.com/msgpack/msgpack-c/issues/1181
- https://github.com/msgpack/msgpack-c/blob/c-7.0.1/src/unpack.c#L429-L502
- https://github.com/msgpack/msgpack-c/blob/c-7.0.1/include/msgpack/unpack.h#L219-L223
- https://github.com/msgpack/msgpack-c/blob/c-7.0.1/example/lib_buffer_unpack.c
- https://github.com/msgpack/msgpack-c
- https://www.vulncheck.com/advisories/msgpack-c-integer-overflow-in-msgpack-unpacker-expand-buffer-causes-a-false-success-undersized-reservation
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.