Loading...
Skip to main content

CVE-2026-48511 — Vulnerability in MessagePack — CVE Details

MEDIUM

MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps

Published June 25, 2026Updated June 25, 2026Source: osv

Summary

## Summary `ExpandoObjectFormatter.Deserialize` populates `System.Dynamic.ExpandoObject` by calling `IDictionary<string, object>.Add` for each map entry. `ExpandoObject` internally maintains member names in array-like structures, so inserting many distinct keys can require repeated linear scans and array copies. For large attacker-controlled maps, this produces quadratic CPU and allocation behavior. The issue is especially surprising because `ExpandoObjectResolver.Options` is configured with `MessagePackSecurity.UntrustedData`, but collision-resistant dictionary comparers cannot protect `ExpandoObject` insertion internals. ## Impact Applications are affected when they deserialize untrusted MessagePack maps into `ExpandoObject` using `ExpandoObjectResolver` or related resolver options. A hostile payload containing many distinct keys can cause CPU exhaustion and allocation churn disproportionate to the input size. This can make a server unresponsive or exhaust memory under concurrent request load. This is not a hash-collision attack against a configurable dictionary comparer. The super-linear behavior comes from `ExpandoObject`'s insertion model, so `MessagePackSecurity.UntrustedData` does not eliminate the cost. ## Affected components - Package: `MessagePack` - APIs: `ExpandoObjectFormatter.Deserialize`, `ExpandoObjectResolver` - Data type: `System.Dynamic.ExpandoObject` - Finding ID: `MESSAGEPACKCSHARP-102` ## Patches Fixes are prepared and will be released in coordinated patch versions. Upgrade guidance: 1. Upgrade `MessagePack` to the patched version for your release line. 2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions. Potential fixes include applying a map-entry count limit for `ExpandoObject` under untrusted-data settings, buffering into a security-aware dictionary before materializing a bounded `ExpandoObject`, or otherwise rejecting maps large enough to trigger quadratic behavior. ## Workarounds Patching is recommended. Until a patched version is available, avoid deserializing untrusted payloads into `ExpandoObject`. Prefer strongly typed DTOs or dictionaries with security-aware comparers and explicit count limits. Enforce request-size and map-entry limits at the transport or application layer. ## Resources - `MESSAGEPACKCSHARP-102`: `ExpandoObjectFormatter` quadratic insertion behavior - CWE-407: Inefficient Algorithmic Complexity

Advisory Timeline

  • First published June 25, 2026 (109 days ago).
  • Last revised June 25, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update MessagePack to 2.5.301 or later
dotnet add package MessagePack --version 2.5.301
NuGet
Update MessagePack to 3.1.7 or later
dotnet add package MessagePack --version 3.1.7

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: nuget (1).

PackageEcosystemAffectedFixed In
MessagePack
nuget
0.1.0-beta, 0.2.0-beta, 0.2.1-beta, 0.2.2-beta (+116 more)2.5.301
MessagePack
nuget
3.0.111-alpha, 3.0.129-beta, 3.0.134-beta, 3.0.208-rc-0001 (+11 more)3.1.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Frequently Asked Questions

What is CVE-2026-48511?
MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2026-48511?
CVE-2026-48511 affects MessagePack. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48511 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-2x83-8g95-xh59

Related CVEs

  • CVE-2026-48502
    HIGH

    MessagePack-CSharp: Denial of service vulnerabilities can swamp the CPU or crash the process with stack and heap overflows

  • CVE-2026-48109
    HIGH

    MessagePack's LZ4 decompression may fail with AccessViolationException after dereferencing memory from bad input

  • CVE-2026-48506
    HIGH

    MessagePack-CSharp: MessagePackReader.Skip can recurse without enforcing maximum object graph depth

  • CVE-2026-48509
    MEDIUM

    MessagePack-CSharp: ASP.NET Core MessagePackInputFormatter defaults to TrustedData for HTTP request bodies

  • CVE-2026-106111
    MEDIUM

    ImageSharp: EXR ZIP decoder can expose stale allocator data after a short inflate

  • CVE-2026-65829
    MEDIUM

    MPXJ: Potential Path Traversal Vulnerability in Primavera P3 PRX and SureTrak STX readers

  • CVE-2020-5234
    MEDIUM

    Untrusted data can lead to DoS attack due to hash collisions and stack overflow in MessagePack

  • CVE-2026-48510
    MEDIUM

    MessagePack-CSharp: LZ4 decompression allocates from unbounded declared output lengths

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies