msgpack-c Integer Overflow in msgpack_unpacker_expand_buffer Causes a False-Success Undersized Reservation
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · Low
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
No fixed version listed by the sources yet.
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-72854
- 2026-10-03 Alias added: GHSA-p5jw-mm77-f8jp
References
More msgpack vulnerabilities
- TI-2026-17336 Uncontrolled resource consumption in msgpack-java CVSS 3.1HIGH 7.5
- TI-2026-61499 msgpack-java through 0.9.12 Stack Overflow via Nested Arrays CVSS 4.0MEDIUM 6.9
- TI-2026-39368 MessagePack::Buffer#clear Use-After-Free that Enables Cross-Buffer Disclosure CVSS 4.0LOW 2.1
- TI-2026-79420 Memory leak in MessagePack C extension when map key validation fails CVSS 3.1HIGH 7.5
- TI-2026-41435 MessagePack: Out-of-bounds read/crash on Unpacker reuse after caught error CVSS 3.1HIGH 7.5
- TI-2026-61500 msgpack-java through 0.9.12 Integer Overflow via MAP32 CVSS 4.0MEDIUM 6.9
Sources
- CVE-2026-72854 · CVE Program
- CVE-2026-72854 · NVD
- FIRST EPSS
- GHSA-p5jw-mm77-f8jp · GitHub Advisory Database · CC BY 4.0
- CVE-2026-72854 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences