{"id":"GHSA-2cwq-pwfr-wcw3","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","aliases":["CVE-2026-44375"],"modified":"2026-05-14T21:04:32.794420Z","published":"2026-05-06T23:05:52Z","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"},"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"}],"affected":[{"package":{"name":"Nerdbank.MessagePack","ecosystem":"NuGet","purl":"pkg:nuget/Nerdbank.MessagePack"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.62"}]}],"versions":["0.1.705-alpha-gad428877b7","0.1.734-alpha-g09268fd45c","0.10.2-rc","0.10.7-rc","0.2.108-alpha","0.2.2-alpha","0.2.34-alpha","0.2.52-alpha","0.2.82-alpha","0.3.120-beta","0.3.151-beta","0.3.161-beta","0.3.2-alpha","0.3.27-alpha","0.3.38-beta","0.4.5-beta","0.5.1-beta","0.5.37-beta","0.5.57-beta","0.5.72-beta","0.5.80-beta","0.6.1-beta","0.6.27-beta","0.6.7-beta","0.7.1-beta","0.8.1-rc","0.8.102-rc","0.8.111-rc","0.8.128-rc","0.8.131-rc","0.8.30-rc","0.8.46-rc","0.8.54-rc","0.8.67-rc","0.8.82-rc","0.8.90-rc","0.8.92-rc","0.9.12-rc","0.9.14-rc","0.9.23-rc","0.9.26-rc","0.9.35-rc","1.0.11","1.0.2","1.0.40","1.0.43","1.1.25"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-2cwq-pwfr-wcw3/GHSA-2cwq-pwfr-wcw3.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}