# CVE-2020-5234: Untrusted data can lead to DoS attack in MessagePack for C# and Unity

> Attackers can cause denial of service in MessagePack for C# and Unity via hash collisions and stack overflow using untrusted data.

- **Severity:** Medium 4.8 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 31 Jan 2020
- **Updated:** 4 Aug 2024
- **Also known as:** AZL-109523, GHSA-7q36-4xx7-xcxf

## What is CVE-2020-5234?

CVE-2020-5234 is a medium-severity denial of service vulnerability in neuecc MessagePack, published on 31 Jan 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

MessagePack for C# and Unity before version 1.9.11 and 2.1.90 has a vulnerability where untrusted data can lead to DoS attack due to hash collisions and stack overflow. Review the linked GitHub Security Advisory for more information and remediation steps.

Weakness: CWE-787 (Out-of-bounds Write), CWE-121 (Stack-based Buffer Overflow)

## Which versions are affected by CVE-2020-5234?

20 open source packages ship an affected version, including MessagePack, MessagePack.ImmutableCollection and MessagePack.ReactiveProperty. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `MessagePack` | NuGet | All versions | 1.9.11 |
| `MessagePack` | NuGet | All versions | 1.9.11 |
| `MessagePack` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.ImmutableCollection` | NuGet | All versions | 1.9.11 |
| `MessagePack.ImmutableCollection` | NuGet | All versions | 1.9.11 |
| `MessagePack.ImmutableCollection` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.ImmutableCollection` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.ReactiveProperty` | NuGet | All versions | 1.9.11 |
| `MessagePack.ReactiveProperty` | NuGet | All versions | 1.9.11 |
| `MessagePack.ReactiveProperty` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.ReactiveProperty` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.Unity` | NuGet | All versions | 1.9.11 |
| `MessagePack.Unity` | NuGet | All versions | 1.9.11 |
| `MessagePack.Unity` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.Unity` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.UnityShims` | NuGet | All versions | 1.9.11 |
| `MessagePack.UnityShims` | NuGet | All versions | 1.9.11 |
| `MessagePack.UnityShims` | NuGet | From 2.0.0 | 2.1.90 |
| `MessagePack.UnityShims` | NuGet | From 2.0.0 | 2.1.90 |

Products: Messagepack Messagepack.

## How do I fix CVE-2020-5234?

Upgrade MessagePack to a fixed version for your release line: 1.9.11 or 2.1.90.

## Is CVE-2020-5234 being exploited?

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

## Other vulnerabilities in neuecc MessagePack

- [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-48502](https://insights.sbomify.com/CVE-2026-48502/): MessagePack-CSharp: Denial of service vulnerabilities can swamp the CPU or crash the process with stack and heap overflows (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)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-5234 and fix it if it is affected.

What it is: CVE-2020-5234 is a medium-severity denial of service vulnerability in neuecc MessagePack, published on 31 Jan 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-5234 in the wild and no public exploit code.

Affected packages and fixed versions:
- MessagePack (NuGet): affected all versions; fixed in 1.9.11
- MessagePack (NuGet): affected all versions; fixed in 1.9.11
- MessagePack (NuGet): affected from 2.0.0; fixed in 2.1.90
- MessagePack (NuGet): affected from 2.0.0; fixed in 2.1.90
- MessagePack.ImmutableCollection (NuGet): affected all versions; fixed in 1.9.11
- MessagePack.ImmutableCollection (NuGet): affected all versions; fixed in 1.9.11
- MessagePack.ImmutableCollection (NuGet): affected from 2.0.0; fixed in 2.1.90
- MessagePack.ImmutableCollection (NuGet): affected from 2.0.0; fixed in 2.1.90
- MessagePack.ReactiveProperty (NuGet): affected all versions; fixed in 1.9.11
- MessagePack.ReactiveProperty (NuGet): affected all versions; fixed in 1.9.11
- MessagePack.ReactiveProperty (NuGet): affected from 2.0.0; fixed in 2.1.90
- MessagePack.ReactiveProperty (NuGet): affected from 2.0.0; fixed in 2.1.90

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-2020-5234/ (Markdown: https://insights.sbomify.com/CVE-2020-5234/index.md)
```

## Sources

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

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