Skip to main content
Vulnerability Database/CVE-2026-92707

CVE-2026-92707: MessagePack for C# DOS Vulnerability

CVE-2026-92707 is a denial of service vulnerability in MessagePack for C# that enables attackers to cause excessive memory allocation through malicious MessagePack data. This article covers technical details, affected versions, impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-92707 Overview

CVE-2026-92707 affects MessagePack for C#, a widely used serialization library in .NET applications. The vulnerability allows attackers to trigger excessive memory allocation by submitting crafted MessagePack payloads to endpoints that deserialize untrusted data as System.Object through PrimitiveObjectFormatter. Nested array headers reuse the same trailing unread bytes to pass per-header length validation, while each declared array length triggers an object[] allocation before the object-graph depth limit rejects the input. The flaw is fixed in versions 2.5.303 and 3.1.9. The weakness is classified under [CWE-1325] (Improperly Controlled Sequential Memory Allocation).

Critical Impact

A compact payload submitted repeatedly to an exposed deserialization path, such as an ASP.NET Core SignalR hub method with AddMessagePackProtocol(), can cause managed-heap pressure, excessive garbage collection, and process termination.

Affected Products

  • MessagePack for C# versions prior to 2.5.303
  • MessagePack for C# 3.x versions prior to 3.1.9
  • ASP.NET Core applications using SignalR with AddMessagePackProtocol() and object parameters

Discovery Timeline

  • 2026-10-15 - CVE-2026-92707 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-92707

Vulnerability Analysis

The vulnerability is a resource-exhaustion flaw in the PrimitiveObjectFormatter deserialization path. When the formatter encounters an array header, it allocates an object[] sized to the declared length before validating child content. Because the configured object-graph depth limit rejects input only after allocation, each declared header produces a live array on the managed heap.

Nested array headers can reference the same trailing unread bytes to satisfy per-header length validation. This lets a small payload declare many large arrays simultaneously. Repeated submissions amplify the effect, driving sustained garbage-collector activity and eventually terminating the host process.

Root Cause

The MessagePackReader struct did not track the minimum number of bytes committed by previously read container headers to their children. Without that bookkeeping, nested headers could reuse the same underlying bytes while still passing length validation, allowing allocation amplification that exceeded the actual payload size.

Attack Vector

An attacker needs network access to an endpoint that deserializes untrusted MessagePack data as System.Object. A reachable SignalR hub method with an object parameter and the MessagePack protocol enabled is the canonical exposure. No authentication or user interaction is required when the endpoint is anonymous.

text
// Patch excerpt - src/MessagePack/MessagePackReader.cs
private SequenceReader<byte> reader;

/// <summary>
/// The minimum number of bytes that previously-read container headers have committed to their children
/// but that have not yet been consumed.
/// </summary>
private long minimumRemainingChildBytes;

/// <summary>
/// The value of <see cref="Consumed"/> when <see cref="minimumRemainingChildBytes"/> was last updated.
/// </summary>
private long minimumRemainingChildBytesCheckpoint;

Source: GitHub Commit 95b63fc. The fix introduces accounting fields that prevent nested headers from reusing the same unread bytes to inflate declared array sizes.

Detection Methods for CVE-2026-92707

Indicators of Compromise

  • Sudden spikes in Gen 2 garbage collections and large-object-heap (LOH) allocations in .NET process counters
  • OutOfMemoryException entries or abrupt process restarts tied to SignalR hubs or MessagePack endpoints
  • Repeated small inbound MessagePack payloads from a single source correlating with memory-pressure events

Detection Strategies

  • Inventory .NET projects for the MessagePack NuGet package and flag versions below 2.5.303 or 3.1.9
  • Review ASP.NET Core startup code for AddMessagePackProtocol() combined with hub methods that accept object parameters
  • Correlate HTTP or WebSocket request volume against process memory and GC telemetry to find amplification patterns

Monitoring Recommendations

  • Instrument .NET applications with EventCounters for gc-heap-size, gen-2-gc-count, and loh-size
  • Alert on request bursts to SignalR hubs exceeding baseline throughput from single clients
  • Capture crash-dump telemetry from managed hosts for post-incident analysis of allocation patterns

How to Mitigate CVE-2026-92707

Immediate Actions Required

  • Upgrade MessagePack for C# to 2.5.303 (2.x branch) or 3.1.9 (3.x branch)
  • Audit SignalR hubs and other deserialization paths for methods accepting System.Object or weakly typed parameters
  • Apply rate limiting and request-size limits to endpoints that accept MessagePack payloads from untrusted callers

Patch Information

The fix is published in the GitHub Release v2.5.303 and GitHub Release v3.1.9. Technical details are documented in GitHub Security Advisory GHSA-qhrr-8q5h-9q3h and the implementation lands in GitHub Commit 7fd78bb.

Workarounds

  • Replace object parameters on SignalR hub methods with concrete, strongly typed models to bypass PrimitiveObjectFormatter
  • Enforce authentication on hubs and endpoints that deserialize MessagePack to limit anonymous abuse
  • Place reverse-proxy limits on payload size and request rate for routes handling MessagePack content
bash
# Upgrade MessagePack package references
dotnet add package MessagePack --version 3.1.9
# Or for the 2.x branch
dotnet add package MessagePack --version 2.5.303

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.