CVE-2026-44375
JSON

7.5high

Nerdbank.MessagePack: Attacker-controlled stackalloc in DateTime decoding causes process-terminating StackOverflowException

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.63% (higher than 45% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2cwq-pwfr-wcw3

Description

Nerdbank.MessagePack is a NativeAOT-compatible MessagePack serialization library. Prior to 1.1.62, Nerdbank.MessagePack contains an uncontrolled stack allocation vulnerability in DateTime decoding. A malicious MessagePack payload can declare an oversized timestamp extension length, causing the reader to allocate an attacker-controlled number of bytes on the stack. This can trigger a StackOverflowException, which is not catchable by user code and terminates the process. This vulnerability is fixed in 1.1.62.

Affected

Product or packageVersionsReported by
AArnott Nerdbank.MessagePack< 1.1.62CVE List
Nerdbank.MessagePack (NuGet)before 1.1.62GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-789

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Nerdbank.MessagePack is a NativeAOT-compatible MessagePack serialization library. Prior to 1.1.62, Nerdbank.MessagePack contains an uncontrolled stack allocation vulnerability in DateTime decoding. A malicious MessagePack payload can declare an oversized timestamp extension length, causing the reader to allocate an attacker-controlled number of bytes on the stack. This can trigger a StackOverflowException, which is not catchable by user code and terminates the process. This vulnerability is fixed in 1.1.62.

GitHub Advisory Database
Summary

Nerdbank.MessagePack contains an uncontrolled stack allocation vulnerability in DateTime decoding. A malicious MessagePack payload can declare an oversized timestamp extension length, causing the reader to allocate an attacker-controlled number of bytes on the stack. This can trigger a StackOverflowException, which is not catchable by user code and terminates the process.

Impact

Applications are impacted if they deserialize MessagePack data from untrusted or attacker-controlled sources using Nerdbank.MessagePack and the target type contains a DateTime value.

A small malicious payload can cause process termination, resulting in a denial of service. This may affect services, APIs, workers, message consumers, or other long-running processes that deserialize untrusted MessagePack input.

The issue occurs because DateTime timestamp extension decoding derives tokenSize from the attacker-controlled extension length before validating that the timestamp length is one of the legal MessagePack timestamp sizes: 4, 8, or 12 bytes. When the buffer is incomplete, that unvalidated size is propagated to the streaming reader slow path, where it is used in a stackalloc.

Patches

The 1.1.62 version contains the fix for this security vulnerability.

Workarounds

If upgrading is not yet possible, avoid deserializing untrusted MessagePack payloads into type graphs that may contain DateTime fields or properties.

Input byte-size limits alone may not fully mitigate this issue, because the malicious payload can be small while declaring a very large extension length. Possible mitigations include:

  • Pre-validating MessagePack extension headers before deserialization and rejecting timestamp extensions whose length is not 4, 8, or 12 bytes.
  • Rejecting or filtering extension type -1 timestamp values from untrusted input unless they are known to be valid.
  • Running deserialization of untrusted payloads in an isolated process that can be safely restarted after termination.
  • Restricting MessagePack deserialization to trusted producers until a patched version is available.
Resources
NVD (es)

Nerdbank.MessagePack es una biblioteca de serialización MessagePack compatible con NativeAOT. Antes de la versión 1.1.62, Nerdbank.MessagePack contiene una vulnerabilidad de asignación de pila incontrolada en la decodificación de DateTime. Una carga útil MessagePack maliciosa puede declarar una longitud de extensión de marca de tiempo excesiva, lo que hace que el lector asigne un número de bytes controlado por el atacante en la pila. Esto puede desencadenar una StackOverflowException, que no es capturable por el código de usuario y termina el proceso. Esta vulnerabilidad está corregida en la versión 1.1.62.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-44375 changed 2026-05-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-2cwq-pwfr-wcw3 changed 2026-05-14CC-BY-4.0
NVDCVE-2026-44375 changed 2026-10-26Public domain