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
CVE-2026-54522 describes a use-after-free vulnerability (CWE-416) in the msgpack-ruby library's Buffer#clear method prior to version 1.8.2. The problem arises because the internal pointers rmem_last, rmem_end, and rmem_owner are not properly cleared after _msgpack_buffer_shift_chunk returns a memory page to the shared pool. This stale state allows subsequent Buffer#write operations and other Buffer instances to alias the freed memory page, potentially leading to disclosure or corruption of data across buffers. The vulnerability has a low CVSS score of 2.1 and is fixed in msgpack-ruby version 1.8.2.
Potential Impact
The vulnerability can cause cross-buffer data disclosure or corruption due to use-after-free conditions in memory management within msgpack-ruby buffers. The impact is limited to local scenarios (attack vector: local) with low complexity and requires partial attack techniques. There is no indication of remote exploitation or privilege escalation. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade msgpack-ruby to version 1.8.2 or later where this use-after-free vulnerability is fixed. Since the vendor advisory confirms the fix in 1.8.2, applying this official update is the recommended remediation. No additional mitigations are specified.
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
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
CVE-2026-54522 describes a use-after-free vulnerability (CWE-416) in the msgpack-ruby library's Buffer#clear method prior to version 1.8.2. The problem arises because the internal pointers rmem_last, rmem_end, and rmem_owner are not properly cleared after _msgpack_buffer_shift_chunk returns a memory page to the shared pool. This stale state allows subsequent Buffer#write operations and other Buffer instances to alias the freed memory page, potentially leading to disclosure or corruption of data across buffers. The vulnerability has a low CVSS score of 2.1 and is fixed in msgpack-ruby version 1.8.2.
Potential Impact
The vulnerability can cause cross-buffer data disclosure or corruption due to use-after-free conditions in memory management within msgpack-ruby buffers. The impact is limited to local scenarios (attack vector: local) with low complexity and requires partial attack techniques. There is no indication of remote exploitation or privilege escalation. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade msgpack-ruby to version 1.8.2 or later where this use-after-free vulnerability is fixed. Since the vendor advisory confirms the fix in 1.8.2, applying this official update is the recommended remediation. No additional mitigations are specified.
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
- Remediation Level
- null
Threat ID: 6a6b81679c2644c7f860e93c
Added to database: 07/30/2026, 16:52:55 UTC
Last enriched: 07/30/2026, 17:10:41 UTC
Last updated: 07/31/2026, 00:23:50 UTC
Views: 8
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.