---
id: "CVE-2026-130065"
page: "https://infrastack.ai/live/CVE-2026-130065"
kind: "vulnerability"
aliases: ["CVE-2026-130065"]
title: "msgpack-c: heap buffer overflow in vrefbuffer migration corrupts memory"
severity: "medium"
cvss: 5.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "c++", "msgpack-c", "package"]
not_affected_if: ["other-msgpack-implementation", "patched-version"]
published_at: "2026-11-16T22:18:21+00:00"
first_seen_at: "2026-11-16T22:39:13+00:00"
updated_at: "2026-11-16T22:41:03+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-130065", "first_seen_at": "2026-11-16T22:39:13+00:00"}]
exploit_sources: []
---

# msgpack-c: heap buffer overflow in vrefbuffer migration corrupts memory

Link for people: https://infrastack.ai/live/CVE-2026-130065 (this .md is for agents)

msgpack-c through 7.0.2 has a heap buffer overflow in msgpack_vrefbuffer_migrate() when migrating between vrefbuffers of unequal size. Writes past the destination array can corrupt adjacent heap memory or crash the application.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed msgpack-c version against the fixed version in the product ranges (unknown if not stated in the sources)
- Look for applications that link msgpack-c and use vrefbuffer migration (unknown if the sources do not say which code paths call it)

## Timeline

- 2026-11-16T22:39:13+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-130065

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/msgpack-c-through-7.0.2-heap-buffer-overflow-via-msgpack-vrefbuffer-migrate
- [fix] Patch: github.com https://github.com/msgpack/msgpack-c/commit/1c47ce020a019a3d4246e6394176779ecdf9d502

## From the sources

msgpack-c through 7.0.2 contains a heap buffer overflow vulnerability in msgpack_vrefbuffer_migrate() in src/vrefbuffer.c that checks capacity against the source array's end pointer. When migrating between vrefbuffers of unequal size, the realloc is skipped and memcpy() writes iovec entries past the destination array, corrupting adjacent heap memory or crashing the application.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
