Skip to content

msgpack-c

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

CVE-2026-72854Published 20 Aug 2026, 18:19 UTC

Real-world risk

0.5/ 10Low

Routine

If the vulnerable configuration applies to you: 1.0

PreliminaryFrom the CVSS vector only · confidence low

CVSS

5.8

scored by the vendor (CNA), CVSS 4.0

In plain words

No plain-language summary yet. The original description is below.

Original description (from VulnCheck)

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.

Am I affected?

ProductAffected versions (from the sources)Fixed in
msgpack-cNiche<= 7.0.1—

What to do

Check the vendor advisory in the references below for fixed versions and workarounds.

Why this score

FactorValueEvidence×
ImpactMajor data tamperingWrites or changes important data without gaining executionFrom the CVSS vector0.70
Attacker positionLocalMust already run code or have a shell on the machineFrom the CVSS vector0.50
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionRoutineA normal action: open a file, visit a page, click a linkFrom the CVSS vector0.70
ConfigurationUncommonNeeds a non-default feature that a minority enablesFrom the CVSS vector0.45
ReliabilityHardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bugFrom the CVSS vector0.45

Threat level T3: Public proof of concept (× 0.95)

A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit

  • Reference tagged as exploit (link)
  • CISA SSVC: proof of concept

EPSS 0.1% chance of exploitation in 30 days (percentile 2), as of 2026-12-03.

The arithmetic
  1. Prerequisites multiplied together0.071
  2. Threat T3: Public proof of concept0.950
  3. 10 × impact 0.7 × prerequisites 0.0709 × threat 0.950.471
  4. Rounded to one decimal between 0.1 and 100.5

How the score works

Exploitation and evidence timeline

  1. 20 Aug 2026 Published
  2. 3 Dec 2026 Reference tagged as exploit first seen
  3. 3 Dec 2026 CISA SSVC: proof of concept first seen
  4. 3 Dec 2026 Risk 0.5 (cvss fallback)

Weakness

CWE-190, CWE-787

References

Get alerts for msgpack-c

Free email or text alerts when a vulnerability in msgpack-c reaches risk 8 or higher. Nothing else.