Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable unauthenticated path but requires specific multi-dimensional array schema (AC:H); pure heap-exhaustion availability impact, no confidentiality or integrity effect.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
2DescriptionCVE.org
MessagePack for C
is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, MessagePack-CSharp's multi-dimensional array formatters read dimension lengths directly from the payload and allocate T[,], T[,,], or T[,,,] before validating that the dimension product matches the encoded element count. The formatter reads a guarded element array header, but allocation of the target multi-dimensional array happens before the dimensions are checked against that element count. A small payload can therefore declare large dimensions, provide an empty or tiny inner array, and cause a large heap allocation before element data is validated. This vulnerability is fixed in 2.5.301 and 3.1.7.
AnalysisAI
Heap exhaustion via crafted multi-dimensional array payloads in MessagePack-CSharp affects all v2.x releases before 2.5.301 and all v3.x releases before 3.1.7, enabling remote unauthenticated attackers to trigger disproportionately large heap allocations with minimal payload bytes. The multi-dimensional array formatters (T[,], T[,,], T[,,,]) allocate based on attacker-supplied dimension values before cross-validating against the encoded element count, so a payload declaring a 10000×10000 array with only a handful of elements forces a massive allocation before any guard fires. No public exploit or active exploitation has been confirmed; the CVSS 4.0 score of 6.3 reflects high attack complexity and a specific prerequisite condition (AT:P), constraining realistic risk to services that deserialize untrusted MessagePack containing multi-dimensional array types.
Technical ContextAI
MessagePack is a compact binary serialization format widely used in .NET microservices and real-time systems. The affected library (cpe:2.3:a:messagepack-csharp:messagepack-csharp) provides type-specific formatters, including formatters for rank-2, rank-3, and rank-4 arrays. The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling): the formatter parses dimension lengths directly from the untrusted byte stream and passes them to the CLR array allocator before performing any cross-check against the separately-encoded element count header. Because CLR array allocation is eager - the runtime provisions the full contiguous block immediately - an attacker can engineer a small payload (just the dimension headers plus a near-empty element array) that forces the host process to commit a large region of managed heap. The element-count guard exists but is reached only after allocation, making it an ineffective check order. Both the v2 and v3 branches of the library contain this logic.
RemediationAI
Upgrade to MessagePack-CSharp 2.5.301 (v2 branch) or 3.1.7 (v3 branch), both of which correct the allocation-before-validation ordering in the multi-dimensional array formatters; the vendor advisory is at https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-cxmj-83gh-fp49. If patching cannot be applied immediately, disable or gate any API endpoints that accept MessagePack payloads containing multi-dimensional array types (T[,], T[,,], T[,,,]) from untrusted callers - this removes the attack surface at the cost of that specific deserialization functionality. As a secondary control, enforcing a strict maximum payload byte size at the transport or middleware layer (e.g., limiting request body size in ASP.NET Core via MaxRequestBodySize) will reduce the magnitude of any single allocation but will not prevent the vulnerability from being triggered by sufficiently small payloads that still declare large dimensions. Restricting MessagePack endpoints to authenticated, internal callers via network policy or API gateway rules eliminates unauthenticated exposure without requiring application changes.
More in Messagepack Csharp
View allDenial of service in MessagePack for C# versions prior to 2.5.301 and 3.1.7 allows remote attackers to terminate host pr
Denial of service in MessagePack for C# versions prior to 2.5.301 and 3.1.7 allows remote attackers to crash application
Typeless deserialization in MessagePack-CSharp allows blocked types to be instantiated by wrapping them inside arrays or
Insecure default initialization in MessagePack for C#'s ASP.NET Core MVC formatter exposes .NET web applications to hash
LZ4 decompression in MessagePack for C# prior to versions 2.5.301 (v2 branch) and 3.1.7 (v3 branch) allows remote attack
Quadratic CPU and memory allocation behavior in MessagePack-CSharp's ExpandoObjectFormatter enables remote unauthenticat
Uncontrolled recursion in MessagePack-CSharp's JSON conversion helpers allows remote attackers to crash .NET host proces
Uncontrolled recursion in MessagePack for C# allows network-reachable attackers to crash applications by submitting deep
Unchecked large-array allocation in MessagePack for C# exposes any .NET application deserializing untrusted MessagePack
CPU denial of service in MessagePack for C# affects applications deserializing ILookup<TKey,TElement> types from untrust
Same technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38381
GHSA-cxmj-83gh-fp49