RubyGems
CVE-2026-126366
msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM
- Severity
- High 7.5
- Published
- 12 Nov 2026
- Last changed
- 12 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.8.7
- Exploit chance
- 0.6% in the next 30 daysHigher than 47% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-73v3-wf97-vpgj
- Sources
- OSV.dev and GitHub
Description
The JRuby implementation of msgpack (msgpack gem, java platform — pure Java decoder under ext/java/) sizes containers directly from the element count written in the message header, with no cap at all: no equivalent of the C unpacker's SHRT_MAX clamp (since 1.7.3) and none of the buffered-bytes cap that commit c8d42d8 added for CRuby in 1.8.6. A single 5-byte message decides how much memory a JVM process tries to allocate:
- array32 header declaring 0x7FFFFFFF elements → new IRubyObject[0x7FFFFFFF] (~8 GiB of reference slots) attempted immediately → java.lang.OutOfMemoryError: Requested array size exceeds VM limit.
- Counts below the VM's max-array-size but above available heap (e.g. 5×10⁸ with a 512 MiB heap) produce a real allocation attempt — OutOfMemoryError: Java heap space — the JVM genuinely tries to take the memory before failing.
- str32/bin32 headers declaring 0x7FFFFFFF bytes do the same via readBytes(size) → new byte[size].
Affected software
| Software | Affected versions |
|---|---|
msgpackRubyGems · osv:RubyGems:msgpack |
|
About msgpack
- Total downloads (RubyGems)
- 546,929,343RubyGems, 24 Nov 2026
This is the only vulnerability in msgpack in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126366
- GitHub Advisory Database https://github.com/advisories/GHSA-73v3-wf97-vpgj