CVE-2026-48513
Received Received - Intake
MessagePack for C# Union Deserialization Depth Bypass

Publication date: 2026-06-22

Last updated on: 2026-06-22

Assigner: GitHub, Inc.

Description
MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, runtime-generated union deserializers emitted by DynamicUnionResolver do not call MessagePackSecurity.DepthStep(ref reader) and do not decrement reader.Depth around recursive deserialization and skip paths. This means union deserialization does not consistently participate in the maximum object graph depth enforcement that protects other recursive formatter paths. For unknown union keys, the emitted deserializer calls reader.Skip() on attacker-controlled data without an enclosing depth step. This vulnerability is fixed in 2.5.301 and 3.1.7.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-22
Last Modified
2026-06-22
Generated
2026-06-23
AI Q&A
2026-06-23
EPSS Evaluated
N/A
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
neuecc messagepack_for_csharp 2.5.301
neuecc messagepack_for_csharp to 3.1.7 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-674 The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability exists in MessagePack for C#, a serializer library. Before versions 2.5.301 and 3.1.7, the runtime-generated union deserializers created by DynamicUnionResolver did not properly enforce maximum object graph depth during recursive deserialization. Specifically, they failed to call MessagePackSecurity.DepthStep(ref reader) and did not decrement reader.Depth around recursive deserialization and skip paths. As a result, union deserialization could bypass the depth checks that protect against excessively deep or recursive data structures. Additionally, when encountering unknown union keys, the deserializer would call reader.Skip() on attacker-controlled data without the necessary depth step, further bypassing protections. This flaw could allow attackers to exploit the deserialization process in ways that were not properly constrained.

Impact Analysis

The vulnerability can lead to improper enforcement of maximum object graph depth during deserialization, potentially allowing an attacker to craft malicious data that causes excessive resource consumption or unexpected behavior in applications using the affected MessagePack for C# versions. This could result in denial of service or other impacts related to processing attacker-controlled data without proper depth checks.

Mitigation Strategies

To mitigate this vulnerability, update MessagePack for C# to version 2.5.301 or 3.1.7 or later, where the issue with runtime-generated union deserializers not enforcing maximum object graph depth has been fixed.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-48513. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart