Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') Affecting messagepack package, versions [3.0,3.1.7)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-MESSAGEPACK-17660972
  • published28 Jun 2026
  • disclosed25 Jun 2026
  • creditUnknown

Introduced: 25 Jun 2026

NewCVE-2026-48502  (opens in a new tab)
CWE-125  (opens in a new tab)
CWE-190  (opens in a new tab)
CWE-407  (opens in a new tab)
CWE-409  (opens in a new tab)
CWE-470  (opens in a new tab)

How to fix?

Upgrade MessagePack to version 3.1.7 or higher.

Overview

MessagePack is a MessagePack(MsgPack) Serializer for C#(.NET, .NET Core, Unity, Xamarin).

Affected versions of this package are vulnerable to Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') in the ReadDateTime function when processing a MessagePack timestamp extension with an attacker-controlled extension length. An attacker can cause the process to terminate unexpectedly by sending a crafted payload that triggers a large stack allocation, resulting in an uncatchable stack overflow exception before proper validation occurs. This is only exploitable if untrusted MessagePack data containing date/time fields is deserialized.

Workaround

This vulnerability can be mitigated by avoiding deserialization of untrusted MessagePack payloads containing date/time fields and enforcing strict maximum message sizes or rejecting malformed extension payloads before processing.

CVSS Base Scores

version 4.0
version 3.1