Loading...
Skip to main content

CVE-2026-48509 — Vulnerability in MessagePack — CVE Details

MEDIUM

MessagePack-CSharp: ASP.NET Core MessagePackInputFormatter defaults to TrustedData for HTTP request bodies

Published June 25, 2026Updated June 25, 2026Source: osv

Summary

## Summary The parameterless `MessagePackInputFormatter()` constructor uses default serializer options, which resolve to `MessagePackSerializerOptions.Standard` with `MessagePackSecurity.TrustedData`. The formatter is designed for ASP.NET Core MVC request bodies, which commonly cross an HTTP trust boundary. This insecure default can expose applications to denial-of-service attacks that `MessagePackSecurity.UntrustedData` is intended to mitigate, such as hash-collision attacks against dictionary-like model properties. ## Impact Applications are affected when they register `new MessagePackInputFormatter()` without explicitly passing serializer options configured for untrusted data. An unauthenticated or otherwise untrusted HTTP client can send MessagePack request bodies that are deserialized using the trusted-data posture. For models containing hash-based collections, this can enable algorithmic complexity attacks using colliding keys. The default constructor makes the unsafe posture easy to use at the exact boundary where request bodies should be treated as untrusted. ## Affected components - Package: `MessagePack.AspNetCoreMvcFormatter` - API: `MessagePackInputFormatter()` parameterless constructor - Scenario: ASP.NET Core MVC model binding from HTTP request bodies - Finding IDs: `MESSAGEPACKCSHARP-OPEN-009`, duplicate `MESSAGEPACKCSHARP-095` ## Patches Fixes are prepared and will be released in coordinated patch versions. Upgrade guidance: 1. Upgrade `MessagePack.AspNetCoreMvcFormatter` to the patched version for your release line. 2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions. The fix should default the parameterless constructor to `MessagePackSerializerOptions.Standard.WithSecurity(MessagePackSecurity.UntrustedData)`, or require callers to pass explicit options so the trust posture is deliberate. ## Workarounds Do not use the parameterless constructor on affected versions. Register the formatter with explicit untrusted-data options, for example: ```csharp options.InputFormatters.Add( new MessagePackInputFormatter( MessagePackSerializerOptions.Standard.WithSecurity(MessagePackSecurity.UntrustedData))); ``` Also apply normal HTTP request-size limits and model validation appropriate for your service. ## Resources - `MESSAGEPACKCSHARP-OPEN-009`: MVC input formatter defaults to trusted-data security posture - `MESSAGEPACKCSHARP-095`: duplicate finding for the same root cause - CWE-1188: Initialization of a Resource with an Insecure Default

Advisory Timeline

  • First published June 25, 2026 (109 days ago).
  • Last revised June 25, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update MessagePack to 2.5.301 or later
dotnet add package MessagePack --version 2.5.301
NuGet
Update MessagePack to 3.1.7 or later
dotnet add package MessagePack --version 3.1.7

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: nuget (1).

PackageEcosystemAffectedFixed In
MessagePack
nuget
0.1.0-beta, 0.2.0-beta, 0.2.1-beta, 0.2.2-beta (+116 more)2.5.301
MessagePack
nuget
3.0.111-alpha, 3.0.129-beta, 3.0.134-beta, 3.0.208-rc-0001 (+11 more)3.1.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 4.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-48509?
MessagePack-CSharp: ASP.NET Core MessagePackInputFormatter defaults to TrustedData for HTTP request bodies This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.5/10).
How do I check if my project is affected by CVE-2026-48509?
CVE-2026-48509 affects MessagePack. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48509 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
4.5

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-2f33-pr97-265q

Related CVEs

  • CVE-2026-48502
    HIGH

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

  • CVE-2026-48109
    HIGH

    MessagePack's LZ4 decompression may fail with AccessViolationException after dereferencing memory from bad input

  • CVE-2026-48506
    HIGH

    MessagePack-CSharp: MessagePackReader.Skip can recurse without enforcing maximum object graph depth

  • CVE-2026-48511
    MEDIUM

    MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps

  • CVE-2026-106111
    MEDIUM

    ImageSharp: EXR ZIP decoder can expose stale allocator data after a short inflate

  • CVE-2026-65829
    MEDIUM

    MPXJ: Potential Path Traversal Vulnerability in Primavera P3 PRX and SureTrak STX readers

  • CVE-2020-5234
    MEDIUM

    Untrusted data can lead to DoS attack due to hash collisions and stack overflow in MessagePack

  • CVE-2026-48510
    MEDIUM

    MessagePack-CSharp: LZ4 decompression allocates from unbounded declared output lengths

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies