CVE-2026-54522: CWE-416: Use After Free in msgpack msgpack-ruby
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.
AI Analysis
Technical Summary
MessagePack for Ruby versions before 1.8.2 contain a use-after-free vulnerability (CWE-416) in the Buffer#clear method implemented in ext/msgpack/buffer.c. Specifically, after _msgpack_buffer_shift_chunk returns a memory page to the shared pool, the internal pointers rmem_last, rmem_end, and rmem_owner are left stale. This allows a subsequent Buffer#write operation and a second MessagePack::Buffer instance to alias the freed memory page, potentially causing data disclosure or corruption across buffers. The vulnerability is resolved in version 1.8.2.
Potential Impact
The vulnerability could allow local attackers with the ability to invoke Buffer#write to cause cross-buffer data disclosure or corruption due to use-after-free conditions. The CVSS score is low (2.1), indicating limited impact and exploitability, with attack vector local and privileges not required.
Mitigation Recommendations
Upgrade msgpack-ruby to version 1.8.2 or later, where this use-after-free vulnerability is fixed. No other mitigation or temporary workaround is documented.
CVE-2026-54522: CWE-416: Use After Free in msgpack msgpack-ruby
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.
CVSS v4.0
Score 2.1low
Affected software
msgpack
msgpack-ruby
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
MessagePack for Ruby versions before 1.8.2 contain a use-after-free vulnerability (CWE-416) in the Buffer#clear method implemented in ext/msgpack/buffer.c. Specifically, after _msgpack_buffer_shift_chunk returns a memory page to the shared pool, the internal pointers rmem_last, rmem_end, and rmem_owner are left stale. This allows a subsequent Buffer#write operation and a second MessagePack::Buffer instance to alias the freed memory page, potentially causing data disclosure or corruption across buffers. The vulnerability is resolved in version 1.8.2.
Potential Impact
The vulnerability could allow local attackers with the ability to invoke Buffer#write to cause cross-buffer data disclosure or corruption due to use-after-free conditions. The CVSS score is low (2.1), indicating limited impact and exploitability, with attack vector local and privileges not required.
Mitigation Recommendations
Upgrade msgpack-ruby to version 1.8.2 or later, where this use-after-free vulnerability is fixed. No other mitigation or temporary workaround is documented.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T18:40:01.651Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a6b81679c2644c7f860e93c
Added to database: 07/30/2026, 16:52:55 UTC
Last enriched: 08/06/2026, 17:31:31 UTC
Last updated: 09/13/2026, 10:01:31 UTC
Views: 52
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.