CVE-2026-44375: Nerdbank.MessagePack Attacker-controlled Stackalloc Vulnerability

HIGH
Advisory Identifier: GHSA-2cwq-pwfr-wcw3
CVSS 7.5
CWE-789
Published
Advisory Summary

CVE-2026-44375 is a HIGH (CVSS 7.5) attacker-controlled stackalloc vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Nerdbank.MessagePack libraries in the NuGet ecosystem. The issue involves attacker-controlled stackalloc in datetime decoding causes process-terminating stackoverflowexception. Remediation is available by upgrading affected packages to version 1.1.62.

CVE-2026-44375 at a Glance

CVE Identifier CVE-2026-44375
GHSA Identifier GHSA-2cwq-pwfr-wcw3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Nerdbank.MessagePack
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-44375

To remediate this vulnerability, upgrade all affected Nerdbank.MessagePack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Nerdbank.MessagePack fixed: 1.1.62
Upgrade Nerdbank.MessagePack to 1.1.62
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Nerdbank.MessagePack

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-44375, inspect your project dependencies for Nerdbank.MessagePack:

inspect dependencies for Nerdbank.MessagePack

Analyze the terminal output to locate any version of Nerdbank.MessagePack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.62), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Nerdbank.MessagePack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 - CWE-789: Uncontrolled Memory Allocation: https://cwe.mitre.org/data/definitions/789.html - MessagePack timestamp extension specification: https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type

CVE-2026-44375 Affected Nerdbank.MessagePack Versions

1 component(s)
Fixed Versions:
1.1.62
Product / Package Ecosystem Affected Versions Fixed Version
Nerdbank.MessagePack
NuGet
< 1.1.62
1.1.62

References

Frequently Asked Questions

What is CVE-2026-44375?
CVE-2026-44375 is a security vulnerability in Nerdbank.MessagePack involving Attacker-controlled stackalloc in DateTime decoding causes process-terminating StackOverflowException under CWE-789: Memory Allocation with Excessive Size Value.
Which Nerdbank.MessagePack versions are affected?
Affected versions include releases prior to 1.1.62 across affected packages: Nerdbank.MessagePack.
What version fixes CVE-2026-44375?
Upgrading to 1.1.62 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Nerdbank.MessagePack affected?
Yes, Nerdbank.MessagePack is affected in releases prior to 1.1.62. Upgrade your dependency to 1.1.62 or later.
What is the CVSS score of CVE-2026-44375?
CVE-2026-44375 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-44375?
CVE-2026-44375 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check NuGet dependencies for CVE-2026-44375?
Run the dependency tree command: 'inspect dependencies for Nerdbank.MessagePack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2cwq-pwfr-wcw3",
  "modified" : "2026-05-14T20:49:35Z",
  "published" : "2026-05-06T23:05:52Z",
  "aliases" : [ "CVE-2026-44375" ],
  "summary" : "Nerdbank.MessagePack: Attacker-controlled stackalloc in DateTime decoding causes process-terminating StackOverflowException",
  "details" : "### Summary\n\nNerdbank.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.\n\n### Impact\n\nApplications are impacted if they deserialize MessagePack data from untrusted or attacker-controlled sources using Nerdbank.MessagePack and the target type contains a `DateTime` value.\n\nA 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.\n\nThe 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`.\n\n### Patches\n\nThe 1.1.62 version contains the fix for this security vulnerability.\n\n### Workarounds\n\nIf upgrading is not yet possible, avoid deserializing untrusted MessagePack payloads into type graphs that may contain `DateTime` fields or properties.\n\nInput 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:\n\n- Pre-validating MessagePack extension headers before deserialization and rejecting timestamp extensions whose length is not 4, 8, or 12 bytes.\n- Rejecting or filtering extension type `-1` timestamp values from untrusted input unless they are known to be valid.\n- Running deserialization of untrusted payloads in an isolated process that can be safely restarted after termination.\n- Restricting MessagePack deserialization to trusted producers until a patched version is available.\n\n### Resources\n\n- CWE-789: Uncontrolled Memory Allocation: https://cwe.mitre.org/data/definitions/789.html\n- MessagePack timestamp extension specification: https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Nerdbank.MessagePack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.62"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AArnott/Nerdbank.MessagePack/security/advisories/GHSA-2cwq-pwfr-wcw3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44375"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AArnott/Nerdbank.MessagePack/pull/941"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AArnott/Nerdbank.MessagePack/commit/7d1eb319cfabe7280e70699946c9a48579fa2f30"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AArnott/Nerdbank.MessagePack"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AArnott/Nerdbank.MessagePack/releases/tag/v1.1.62"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-06T23:05:52Z",
    "nvd_published_at" : "2026-05-14T15:16:48Z"
  }
}