Loading...
Skip to main content

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

HIGH

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

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

Summary

## Summary `MessagePackReader.TrySkip()` recursively descends into nested arrays and maps without incrementing the reader depth or calling the configured depth checks. This bypasses `MessagePackSecurity.MaximumObjectGraphDepth`, the library's documented protection against deeply nested object graphs. Many generated and dynamic formatters call `reader.Skip()` when they encounter unknown map keys, unknown array members, ignored fields, or data that should be skipped for forward compatibility. A deeply nested value in one of these skipped positions can therefore cause unbounded recursion and an uncatchable `StackOverflowException`. ## Impact Applications that deserialize untrusted MessagePack payloads are affected when a formatter skips attacker-controlled values. This is a broad deserialization path and can be reached during normal object deserialization when an input includes an unknown member or extra value. The attacker does not need to target a special resolver or compression mode. A payload containing many nested single-element arrays or maps in a skipped location can exhaust the process stack. Because `StackOverflowException` is not catchable in normal .NET execution, this terminates the host process and can deny service to other users of the same process. `MessagePackSecurity.UntrustedData` does not mitigate this issue because the skip path does not participate in depth accounting. ## Affected components - Package: `MessagePack` - APIs: `MessagePackReader.Skip`, `MessagePackReader.TrySkip`, and formatter paths that skip unknown or ignored values - Finding IDs: `MESSAGEPACKCSHARP-021`, duplicate/open variant `MESSAGEPACKCSHARP-OPEN-001` ## 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. The fix should either make skip traversal iterative or apply the existing depth accounting to arrays and maps encountered by `TrySkip()`. Any exceeded depth limit should result in a catchable serialization exception instead of process stack exhaustion. ## Workarounds Patching is recommended. There is no complete workaround for applications that deserialize untrusted MessagePack payloads with affected versions. Reducing accepted message sizes can raise the cost of exploitation but does not remove the recursive skip behavior. Strict schema validation outside MessagePack-CSharp may help only if it rejects unknown or skipped fields before the serializer sees them. ## Resources - `MESSAGEPACKCSHARP-021`: unbounded recursion in `TrySkip()` - `MESSAGEPACKCSHARP-OPEN-001`: duplicate/open finding for the same root cause - CWE-674: Uncontrolled Recursion ## CVE split rationale This vulnerability is independently fixable in the skip traversal implementation. It should be tracked separately from formatter-specific missing depth checks, JSON conversion recursion, and non-recursion allocation bugs.

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-48506?
MessagePack-CSharp: MessagePackReader.Skip can recurse without enforcing maximum object graph depth This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2026-48506?
CVE-2026-48506 affects MessagePack. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48506 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-vh6j-jc39-fggf

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-106112
    HIGH

    ImageSharp: ICC LUT16 output channel count can write beyond Vector4

  • CVE-2026-48109
    HIGH

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

  • CVE-2026-106115
    HIGH

    ImageSharp: TIFF CCITT T6 encoder writes beyond an undersized output buffer

  • CVE-2026-48509
    MEDIUM

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

  • CVE-2026-48511
    MEDIUM

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

  • 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