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

> An integer overflow in msgpack-c's buffer expansion allows heap buffer overflows when integrating with length-prefixed transports, potentially leading to code execution.

- **Severity:** Medium 5.8 (`CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Aug 2026
- **Updated:** 24 Sep 2026
- **Also known as:** AZL-97458, AZL-97512, AZL-97515, DEBIAN-CVE-2026-72854, GHSA-p5jw-mm77-f8jp, MGASA-2026-0533, SUSE-SU-2026:23630-1, UBUNTU-CVE-2026-72854, openSUSE-SU-2026:11672-1, openSUSE-SU-2026:21768-1

## What is CVE-2026-72854?

CVE-2026-72854 is a medium-severity vulnerability in msgpack-c, published on 20 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

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

Weakness: CWE-787 (Out-of-bounds Write), CWE-190 (Integer Overflow or Wraparound)

## Which versions are affected by CVE-2026-72854?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `msgpack-c` | SUSE:Linux Enterprise Server 16.0 | All versions | 7.0.2-160000.1.1 |
| `msgpack-c` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 7.0.2-160000.1.1 |
| `msgpack-c` | openSUSE:Leap 16.0 | All versions | 7.0.2-160000.1.1 |
| `msgpack-c` | openSUSE:Tumbleweed | All versions | 7.0.2-2.1 |

## How do I fix CVE-2026-72854?

Apply the vendor's patch.

## Is CVE-2026-72854 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-72854 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-72854 and fix it if it is affected.

What it is: CVE-2026-72854 is a medium-severity vulnerability in msgpack-c, published on 20 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-72854 exists.

Affected product: msgpack-c. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-72854/ (Markdown: https://insights.sbomify.com/CVE-2026-72854/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-72854
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-72854
- OSV: https://osv.dev/vulnerability/CVE-2026-72854

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-72854/
Summaries are generated and may contain mistakes; the official description above is the record.
