p PatchFirst

CVE-2026-72854

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

CVSS 5.8 · Medium · EPSS 0.2% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="msgpack-c"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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
Updated

Fixes in distributions

Stack: system

Affected products and versions

  • msgpack-c

    Versions
    • ≥ 0, ≤ 7.0.1: Affected (custom)

    No fix published

  • msgpack-c Debian 12

    Versions
    • 4.0.0-3
    • 6.0.0-1
    • 6.0.0-2
    • 6.0.0-3
    • 6.0.0-4
    • 6.0.0-5
    All versions (13)
    • 6.0.1-1
    • 6.0.1-2
    • 6.0.1-3
    • 6.1.0-1
    • 6.1.0-2
    • 7.0.1-1
    • 7.0.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Debian 13

    Versions
    • 6.0.1-3
    • 6.1.0-1
    • 6.1.0-2
    • 7.0.1-1
    • 7.0.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Debian 14

    Versions
    • 6.0.1-3
    • 6.1.0-1
    • 6.1.0-2
    • 7.0.1-1
    Affected ranges
    • ECOSYSTEM: < 7.0.2-1

    Update to 7.0.2-1

  • msgpack-c Ubuntu 18.04 LTS

    Versions
    • 2.1.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Ubuntu 20.04 LTS

    Versions
    • 3.0.1-3
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Ubuntu 22.04 LTS

    Versions
    • 3.3.0-4
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Ubuntu 24.04 LTS

    Versions
    • 4.0.0-3
    • 4.0.0-3build1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Ubuntu 26.10

    Versions
    • 6.1.0-2
    • 7.0.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • msgpack-c Ubuntu 26.04 LTS

    Versions
    • 6.0.1-3
    • 6.1.0-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →