CVE-2026-48511 — Vulnerability in MessagePack — CVE Details
MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.40%). Schedule for your next planned update.
Does your project use an affected MessagePack version?
Paste your packages.lock.json to check it for CVE-2026-48511 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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:
- Upgrade
MessagePackto the patched version for your release line. - 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:ExpandoObjectFormatterquadratic insertion behavior- CWE-407: Inefficient Algorithmic Complexity
Advisory Timeline
- First published June 25, 2026 (154 days ago).
- Last revised June 25, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package MessagePack --version 2.5.301
dotnet add package MessagePack --version 3.1.7
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: NuGet (1).
| Package | Fixed In |
|---|---|
| MessagePack NuGet · Affected: 0.1.0-beta, 0.2.0-beta, 0.2.1-beta, 0.2.2-beta (+116 more) | 2.5.301 |
| MessagePack NuGet · Affected: 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.
- CWE-407
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
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. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48511 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 26.3% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-48502HIGH
MessagePack-CSharp: Denial of service vulnerabilities can swamp the CPU or crash the process with stack and heap overflows
- CVE-2026-48109HIGH
MessagePack's LZ4 decompression may fail with AccessViolationException after dereferencing memory from bad input
- CVE-2026-48506HIGH
MessagePack-CSharp: MessagePackReader.Skip can recurse without enforcing maximum object graph depth
- CVE-2026-48509MEDIUM
MessagePack-CSharp: ASP.NET Core MessagePackInputFormatter defaults to TrustedData for HTTP request bodies
- CVE-2026-114154MEDIUM
Microsoft Security Advisory CVE-2026-114154 - ASP.NET Core Denial of Service Vulnerability
- GHSA-6856-87hx-p5x7MEDIUM
Microsoft Security Advisory CVE-2026-105544 - .NET Elevation of Privilege Vulnerability
- CVE-2020-5234MEDIUM
Untrusted data can lead to DoS attack due to hash collisions and stack overflow in MessagePack
- CVE-2026-48510MEDIUM
MessagePack-CSharp: LZ4 decompression allocates from unbounded declared output lengths