CVE-2026-48513
Analyzed Analyzed - Analysis Complete

MessagePack for C# Union Deserialization Depth Bypass

Vulnerability report for CVE-2026-48513, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-06-22

Last updated on: 2026-06-25

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-25
Generated
2026-07-13
AI Q&A
2026-06-23
EPSS Evaluated
2026-07-11
NVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
messagepack messagepack to 2.5.301 (exc)
messagepack messagepack From 3.0.3 (inc) 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
Detection Guidance

This vulnerability involves the MessagePack-CSharp library's dynamic union deserializers failing to enforce depth limits, which can lead to a StackOverflowException when processing deeply nested payloads with unknown union keys.

Detection on your system or network would involve monitoring for abnormal application crashes or StackOverflowExceptions related to MessagePack deserialization, especially when handling untrusted or external data.

Since the issue is specific to the DynamicUnionResolver.BuildDeserialize API and the deserialization process, direct detection commands are not provided in the available resources.

As a practical step, you can audit your application logs for exceptions or crashes related to MessagePack deserialization. For example, searching logs for 'StackOverflowException' or errors mentioning 'MessagePack' or 'DynamicUnionResolver' might help identify exploitation attempts.

  • Use log search commands like: grep -i 'StackOverflowException' /var/log/app.log
  • Monitor application crash reports or error logs for deserialization failures.
  • Review your codebase or dependencies to check if vulnerable versions of MessagePack-CSharp (prior to 2.5.301 or 3.1.7) are in use.
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.

Compliance Impact

The vulnerability in MessagePack for C# involves improper enforcement of maximum object graph depth during union deserialization, which could potentially allow attacker-controlled data to bypass certain security checks.

However, there is no specific information provided about how this vulnerability directly impacts compliance with common standards and regulations such as GDPR or HIPAA.

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