Skip to content

CVE-2026-72854 msgpack-c Integer Overflow in msgpack_unpacker_expand_buffer Causes a False-Success Undersized Reservation

MediumCVSS 5.8 EPSS 0.16%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial
Technology
UbuntuDebian

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 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.

Upgrade path

11 packages: 2 fixed, 9 with no fix yet.

PackageAffectedFixed inStatus
azure linux fluent-bit(Azure Linux 3.0) All versions No fix listed No fix yet
azure linux lttng-tools(Azure Linux 3.0) All versions No fix listed No fix yet
azure linux msgpack(Azure Linux 3.0) All versions No fix listed No fix yet
debian/msgpack-c(Debian 12) = 4.0.0-3; = 6.0.0-1; = 6.0.0-2; = 6.0.0-3 +10 more No fix listed No fix yet
debian/msgpack-c(Debian 13) = 6.0.1-3; = 6.1.0-1; = 6.1.0-2; = 7.0.1-1 +2 more No fix listed No fix yet
ubuntu/msgpack-c(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/msgpack-c(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/msgpack-c(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/msgpack-c(Ubuntu 26.10) All versions No fix listed No fix yet
debian/msgpack-c(Debian 14) < 7.0.2-1; = 6.0.1-3; = 6.1.0-1; = 6.1.0-2 +1 more 7.0.2-1 Fixed
msgpack-c <= 7.0.1 after 7.0.1 Fixed

Affected products

ProductAffected versionsFixed in
msgpack-c <= 7.0.1 No fix listed
debian/msgpack-c(Debian:12) All versions No fix listed
debian/msgpack-c(Debian:12) = 4.0.0-3 No fix listed
debian/msgpack-c(Debian:12) = 6.0.0-1 No fix listed
debian/msgpack-c(Debian:12) = 6.0.0-2 No fix listed
debian/msgpack-c(Debian:12) = 6.0.0-3 No fix listed
debian/msgpack-c(Debian:12) = 6.0.0-4 No fix listed
debian/msgpack-c(Debian:12) = 6.0.0-5 No fix listed
debian/msgpack-c(Debian:12) = 6.0.1-1 No fix listed
debian/msgpack-c(Debian:12) = 6.0.1-2 No fix listed
debian/msgpack-c(Debian:12) = 6.0.1-3 No fix listed
debian/msgpack-c(Debian:12) = 6.1.0-1 No fix listed
debian/msgpack-c(Debian:12) = 6.1.0-2 No fix listed
debian/msgpack-c(Debian:12) = 7.0.1-1 No fix listed
debian/msgpack-c(Debian:12) = 7.0.2-1 No fix listed
debian/msgpack-c(Debian:13) All versions No fix listed
debian/msgpack-c(Debian:13) = 6.0.1-3 No fix listed
debian/msgpack-c(Debian:13) = 6.1.0-1 No fix listed
debian/msgpack-c(Debian:13) = 6.1.0-2 No fix listed
debian/msgpack-c(Debian:13) = 7.0.1-1 No fix listed
debian/msgpack-c(Debian:13) = 7.0.2-1 No fix listed
debian/msgpack-c(Debian:14) < 7.0.2-1 7.0.2-1
debian/msgpack-c(Debian:14) = 6.0.1-3 No fix listed
debian/msgpack-c(Debian:14) = 6.1.0-1 No fix listed
debian/msgpack-c(Debian:14) = 6.1.0-2 No fix listed
Show 8 more
ProductAffected versionsFixed in
debian/msgpack-c(Debian:14) = 7.0.1-1 No fix listed
ubuntu/msgpack-c(Ubuntu:22.04) All versions No fix listed
ubuntu/msgpack-c(Ubuntu:24.04) All versions No fix listed
ubuntu/msgpack-c(Ubuntu:26.04) All versions No fix listed
ubuntu/msgpack-c(Ubuntu:26.10) All versions No fix listed
azure linux fluent-bit(Azure Linux:3.0) All versions No fix listed
azure linux lttng-tools(Azure Linux:3.0) All versions No fix listed
azure linux msgpack(Azure Linux:3.0) All versions No fix listed

References