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.
Published: 2026-07-30
Score: 2.1 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

MessagePack for Ruby implements a binary serialization format. In versions prior to 1.8.2, the Buffer#clear method in ext/msgpack/buffer.c fails to reset the rmem_last, rmem_end, and rmem_owner pointers after a memory page from the shared pool is reclaimed. This stale metadata allows a subsequent Buffer#write to an alias of that memory page, and a second Buffer instance that shares the same allocated chunk can then access or corrupt data that was stored by the first instance. The flaw is a use‑after‑free that enables a cross‑buffer disclosure or corruption attack, potentially exposing sensitive application data or corrupting normal program state. The low CVSS score of 2.1 reflects the limited impact level, but the presence of a data disclosure vector remains noteworthy for systems that handle confidential information.

Affected Systems

The affected product is MessagePack for Ruby (msgpack:msgpack-ruby). Any Ruby environment that includes this gem in a version prior to 1.8.2 is susceptible. The vulnerability is addressed starting with gem version 1.8.2. There are no explicit OS or platform constraints beyond the presence of the vulnerable Ruby library.

Risk and Exploitability

The CVSS base score of 2.1 indicates low severity, and the EPSS score of 0.00119 (less than 1%) indicates a very low exploitation probability. The flaw is not listed in the CISA KEV catalog. An attacker with the ability to construct or control both Buffer objects – which could be achieved by executing Ruby code from an untrusted input source – can exploit the use‑after‑free to read or overwrite memory belonging to another buffer. The exploit does not require elevated privileges or network access if one can supply Ruby code; it may be possible to leverage the flaw in a remote code execution context if the application exposes a user‑supplied Ruby API. Overall the risk is low to moderate, depending on the exposure of Ruby code to untrusted input.

Generated by OpenCVE AI on August 2, 2026 at 05:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade MessagePack for Ruby to version 1.8.2 or later.
  • Restrict execution of untrusted Ruby code to prevent malicious Buffer object creation.
  • Apply secure coding practices and conduct code‑review or static analysis to ensure Buffer instances are not improperly shared across untrusted contexts.

Generated by OpenCVE AI on August 2, 2026 at 05:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-4mrv-5p47-p938 MessagePack::Buffer#clear Use-After-Free that Enables Cross-Buffer Disclosure
History

Thu, 30 Jul 2026 20:15:00 +0000

Type Values Removed Values Added
First Time appeared Msgpack
Msgpack msgpack
Vendors & Products Msgpack
Msgpack msgpack

Thu, 30 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 30 Jul 2026 17:00:00 +0000

Type Values Removed Values Added
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.
Title MessagePack::Buffer#clear Use-After-Free that Enables Cross-Buffer Disclosure
Weaknesses CWE-416
References
Metrics cvssV4_0

{'score': 2.1, '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'}


Subscriptions

Msgpack Messagepack Msgpack
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-30T17:39:15.020Z

Reserved: 2026-06-15T18:40:01.651Z

Link: CVE-2026-54522

cve-icon Vulnrichment

Updated: 2026-07-30T17:38:06.996Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-30T17:16:33.030

Modified: 2026-08-05T19:41:34.330

Link: CVE-2026-54522

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T05:15:15Z

Weaknesses