Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. msgpack
  4. ›
  5. CVE-2026-54522

CVE-2026-54522: MessagePack::Buffer#clear Use-After-Free that Enables Cross-Buffer Disclosure

July 30, 2026

MessagePack::Buffer#clear shifts out every chunk and returns its 4 KiB rmem page to the shared pool, but does not reset the buffer’s rmem cursor (rmem_last, rmem_end, rmem_owner). The next write sees “unused rmem space” left over from the freed page and hands back a slice of memory that has already been returned to the pool. A second MessagePack::Buffer then re-acquires that same page, so reading the cleared-and-rewritten buffer discloses the second buffer’s bytes — a same-process use-after-free with cross-buffer information disclosure (and the symmetric write-corruption).

References

  • github.com/advisories/GHSA-4mrv-5p47-p938
  • github.com/msgpack/msgpack-ruby/commit/5627d71606b565641d2dd501b82aae862f4abe90
  • github.com/msgpack/msgpack-ruby/security/advisories/GHSA-4mrv-5p47-p938
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/msgpack/CVE-2026-54522.yml
  • nvd.nist.gov/vuln/detail/CVE-2026-54522
  • www.cve.org/CVERecord/SearchResults?query=CVE-2026-54522

Code Behaviors & Features

Detect and mitigate CVE-2026-54522 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.8.2

Fixed versions

  • 1.8.2

Solution

Upgrade to version 1.8.2 or above.

Impact 4 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-416: Use After Free

Source file

gem/msgpack/CVE-2026-54522.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 31 Jul 2026 12:18:37 +0000.