Intel

AIKIDO-2026-421995

msgpack is vulnerable to Out-of-Bounds Write

Out-of-Bounds Write Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

59

Medium Risk

This Affects:

RUBYmsgpack
1.7.4 - 1.8.4
Fixed in 1.8.5
Are you affected? Scan for Free

TL;DR

MessagePack::Unpacker's read_raw_body_begin pushes a stack barrier before calling a registered extension type's proc, then pops that barrier unconditionally after the proc returns. When the proc drives the same unpacker itself, for example by calling read or skip or by rescuing a read error, it leaves stack.depth at 0 before the unconditional pop runs, underflowing depth to SIZE_MAX and causing out-of-bounds access into the unpacker's internal stack array on the next unpack call. This crashes the Ruby VM with a segmentation fault and can leave Factory extension-type state corrupted. The fix restores depth to the barrier value directly instead of blindly decrementing it.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you register a recursive extension type whose packer or unpacker proc itself calls back into the same unpacker.

Background info

msgpack is vulnerable to Out-of-Bounds Write in versions 1.7.4 - 1.8.4.

How to fix this

Upgrade the msgpack library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform