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?
| Product | Affected 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
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data tamperingWrites or changes important data without gaining execution | From the CVSS vector | 0.70 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.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
- Prerequisites multiplied together0.071
- Threat T3: Public proof of concept0.950
- 10 × impact 0.7 × prerequisites 0.0709 × threat 0.950.471
- Rounded to one decimal between 0.1 and 100.5
Exploitation and evidence timeline
- 20 Aug 2026 Published
- 3 Dec 2026 Reference tagged as exploit first seen
- 3 Dec 2026 CISA SSVC: proof of concept first seen
- 3 Dec 2026 Risk 0.5 (cvss fallback)
Weakness
CWE-190, CWE-787
References
- https://github.com/msgpack/msgpack-c/issues/1181exploit, issue-tracking
- https://github.com/msgpack/msgpack-c/blob/c-7.0.1/src/unpack.c#L429-L502technical-description
- https://github.com/msgpack/msgpack-c/blob/c-7.0.1/include/msgpack/unpack.h#L219-L223technical-description
- https://github.com/msgpack/msgpack-c/blob/c-7.0.1/example/lib_buffer_unpack.ctechnical-description
- https://github.com/msgpack/msgpack-cproduct
- https://www.vulncheck.com/advisories/msgpack-c-integer-overflow-in-msgpack-unpacker-expand-buffer-causes-a-false-success-undersized-reservationthird-party-advisory
- CVE-2026-72854 on CVE.org