# CVE-2026-48502: MessagePack-CSharp: Denial of service vulnerabilities can swamp the CPU or crash the process with stack and heap overflows

> Attackers can crash the host process via stack overflow in MessagePack-CSharp by sending crafted timestamp extension data.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Jun 2026
- **Updated:** 23 Jun 2026
- **Also known as:** GHSA-382j-8mxh-c7x2

## What is CVE-2026-48502?

CVE-2026-48502 is a high-severity denial of service vulnerability in MessagePack-CSharp, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, MessagePackReader.ReadDateTime() can allocate stack memory based on an attacker-controlled MessagePack extension length. In the slow path for timestamp extension parsing, the computed tokenSize includes the extension body length from the wire and is used in a stackalloc operation before the extension length is validated as one of the valid timestamp sizes. A very small payload can claim a large timestamp extension body and cause a stack allocation large enough to trigger an uncatchable StackOverflowException, terminating the host process. This vulnerability is fixed in 2.5.301 and 3.1.7.

Weakness: CWE-789 (Memory Allocation with Excessive Size Value), CWE-674 (Uncontrolled Recursion), CWE-502 (Deserialization of Untrusted Data), CWE-409 (Improper Handling of Highly Compressed Data (Data Amplification)), CWE-407 (Inefficient Algorithmic Complexity), CWE-190 (Integer Overflow or Wraparound), CWE-470 (Use of Externally-Controlled Input to Select Classes or Code), CWE-125 (Out-of-bounds Read), CWE-1188 (Initialization of a Resource with an Insecure Default)

## Which versions are affected by CVE-2026-48502?

2 open source packages ship an affected version, including MessagePack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `MessagePack` | NuGet | From 3.0 | 3.1.7 |
| `MessagePack` | NuGet | From 3.0 | 3.1.7 |

Products: Messagepack Messagepack.

## How do I fix CVE-2026-48502?

Upgrade MessagePack to 3.1.7 or later.

## Is CVE-2026-48502 being exploited?

There is no known exploitation of CVE-2026-48502 in the wild and no public exploit code.

## Other vulnerabilities in MessagePack-CSharp

- [CVE-2026-48109](https://insights.sbomify.com/CVE-2026-48109/): MessagePack-CSharp: LZ4 decompression may fail with AccessViolationException after dereferencing memory from bad input (high 8.2)
- [CVE-2026-48506](https://insights.sbomify.com/CVE-2026-48506/): MessagePack-CSharp: MessagePackReader.Skip can recurse without enforcing maximum object graph depth (high 7.5)
- [CVE-2026-48509](https://insights.sbomify.com/CVE-2026-48509/): MessagePack-CSharp: ASP.NET Core MessagePackInputFormatter defaults to TrustedData for HTTP request bodies (medium 6.3)
- [CVE-2026-48510](https://insights.sbomify.com/CVE-2026-48510/): MessagePack-CSharp: LZ4 decompression allocates from unbounded declared output lengths (medium 6.3)
- [CVE-2026-48511](https://insights.sbomify.com/CVE-2026-48511/): MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps (medium 6.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48502 and fix it if it is affected.

What it is: CVE-2026-48502 is a high-severity denial of service vulnerability in MessagePack-CSharp, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-48502 in the wild and no public exploit code.

Affected packages and fixed versions:
- MessagePack (NuGet): affected from 3.0; fixed in 3.1.7
- MessagePack (NuGet): affected from 3.0; fixed in 3.1.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48502/ (Markdown: https://insights.sbomify.com/CVE-2026-48502/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48502
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48502
- OSV: https://osv.dev/vulnerability/CVE-2026-48502

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48502/
Summaries are generated and may contain mistakes; the official description above is the record.
