What’s Vulnerable › Vulnerabilities
CVE-2026-54522: MessagePack::Buffer#clear Use-After-Free that Enables Cross-Buffer Disclosure
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2026-07-30 · updated 2026-10-23
- Weakness: CWE-416
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.
Affected products
- msgpack Messagepack: before 1.8.2 — fixed in 1.8.2
- Rubygems Msgpack: before 1.8.2; 0.0.1, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.3.1 (+87) — fixed in 1.8.2
How to fix
Upgrade to a fixed version: msgpack Messagepack 1.8.2; Rubygems Msgpack 1.8.2. Check the vendor advisory for mitigations.
References
- https://github.com/msgpack/msgpack-ruby/commit/5627d71606b565641d2dd501b82aae862f4abe90
- https://github.com/msgpack/msgpack-ruby/security/advisories/GHSA-4mrv-5p47-p938
- https://github.com/msgpack/msgpack-ruby/security/advisories/GHSA-4mrv-5p47-p938
Get alerted when CVE-2026-54522 or the next vulnerability affects your stack