CVE-2026-54522
Description
A flaw was found in MessagePack for Ruby, an implementation of the MessagePack binary serialization format. The MessagePack::Buffer#clear function fails to properly reset internal memory pointers after returning a memory page to a shared pool. This allows a subsequent write operation to reuse the freed memory, leading to a use-after-free vulnerability where two MessagePack::Buffer instances can alias the same memory. Consequently, this can result in the disclosure of sensitive information or corruption of data across different memory buffers within the same process.
Statement
This vulnerability is rated as Moderate severity because exploitation requires an application to explicitly manage buffer lifecycles using the Buffer#clear method and subsequent reuse within the same process, limiting exposure to specific programmatic implementations rather than standard serialization workflows. Standard deserialization of untrusted payloads alone is insufficient to trigger the condition. Although an aliased buffer could expose or corrupt serialized data across concurrent operations in multi-tenant environments, the flaw does not grant direct remote code execution or system-level privilege escalation.
Understanding the Weakness (CWE)
Confidentiality
Technical Impact: Read Memory
If the expired pointer is used in a read operation, an attacker might be able to control data read in by the application.
Availability
Technical Impact: DoS: Crash, Exit, or Restart
If the expired pointer references a memory location that is not accessible to the product, or points to a location that is "malformed" (such as NULL) or larger than expected by a read or write operation, then a crash may occur.
Integrity,Confidentiality,Availability
Technical Impact: Execute Unauthorized Code or Commands
If the expired pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.