Skip to main content
EPSS 0.2%top 94%

CVE-2026-54522: CWE-416: Use After Free in msgpack msgpack-ruby

0
Medium
Published: 07/30/2026 (07/30/2026, 17:16:00 UTC)
Source: CVE Database V5
Vendor/Project: msgpack
Product: 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

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

msgpack

msgpack-ruby

Affected versions
<1.8.2
msgpack
pkg:gem/msgpack
Affected versions
<1.8.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/06/2026, 17:31:31 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses