Mittel

MessagePack: Nested arrays can blow past buffer length limits

  • Veröffentlicht: 15.10.2026
  • Aktualisiert: 22.10.2026 18:07

Impact

MessagePack-CSharp is vulnerable to denial of service through excessive memory allocation when deserializing attacker-controlled data into System.Object.

When PrimitiveObjectFormatter encounters an array, it allocates an object[] using the declared array length before enforcing the configured maximum object-graph depth. A specially crafted payload containing deeply nested arrays can therefore keep many large arrays live simultaneously before deserialization is rejected for exceeding the depth limit.

Because the array-header validation uses the total unread byte count as evidence that the declared elements may be present, nested array headers can reuse the same trailing bytes for this validation. This permits a relatively small payload to cause disproportionately large managed-heap allocations. The reported example uses an approximately 31.5 KiB payload to allocate roughly 114.7 MiB of reference storage on x64—an amplification factor of approximately 3,800—before the depth exception is raised. Repeated requests may cause severe memory pressure, excessive garbage collection, process termination, or loss of service availability.

Applications are affected when they:

  • Deserialize untrusted MessagePack data as object, or otherwise use a resolver path that selects PrimitiveObjectFormatter; and
  • Permit an attacker to submit such data repeatedly.

ASP.NET Core SignalR is one known way to expose the vulnerability remotely: an application that enables AddMessagePackProtocol() and has a reachable hub method with an object parameter may pass attacker-controlled arguments to the vulnerable MessagePack-CSharp formatter. However, the underlying vulnerability is in MessagePack-CSharp, not SignalR, and other applications that deserialize untrusted data through the same formatter may also be affected.

MessagePack-CSharp 2.5.302 is confirmed to contain the vulnerable code. Other releases containing the same allocate-before-depth-check behavior may also be affected. Authentication requirements depend on the application exposing the deserialization endpoint: exploitation requires no privileges for a publicly reachable endpoint, while protected endpoints retain their configured authorization requirements.

Workarounds

Where possible, avoid deserializing untrusted data into System.Object, including object-typed members of otherwise strongly typed models. Use concrete, narrowly defined DTO types instead.

For ASP.NET Core SignalR applications, any of the following can prevent or reduce exposure:

  • Replace object parameters in reachable hub methods with concrete types.
  • Disable the MessagePack hub protocol and use another protocol until a patched MessagePack-CSharp release is available.
  • Restrict affected hub methods to trusted and authenticated callers.
  • Apply rate limits and connection limits to reduce the ability to repeat malicious requests.

Reducing the maximum deserialization depth or transport message size may reduce the worst-case allocation, but should be treated only as defense in depth. It does not correct the allocate-before-depth-check behavior and is not a complete remediation.

Applications with advanced resolver configurations may use a custom formatter for object that enforces the depth limit before allocating arrays. Such a formatter should be carefully reviewed and tested against untrusted input.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
.NET (NuGet) MessagePack < 2.5.303, >= 3.0.0, < 3.1.9 2.5.303, 3.1.9

Verweise

CVSS-Wert 5.3/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Schwäche (CWE)
CWE-1325
Plattform
.NET (NuGet)
Paket
MessagePack
Veröffentlicht
15.10.2026
Aktualisiert
22.10.2026 18:07

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-qhrr-8q5h-9q3h - CC BY 4.0

Schwachstellenhistorie: MessagePack

Alle veröffentlichten Schwachstellen dieses Pakets (.NET (NuGet)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (15) im Archiv
Einträge insgesamt
15
Erste → letzte
01.2020 10.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 3
  • Mittel 12

Veröffentlichungen pro Jahr

  1. 2020: 1
  2. 2021: 0
  3. 2022: 0
  4. 2023: 0
  5. 2024: 1
  6. 2025: 0
  7. 2026: 13
Schweregrad:
  1. MessagePack: Nested arrays can blow past buffer length limits dieser Eintrag
    Mittel · 5.3 CVE-2026-92707 < 2.5.303, >= 3.0.0, < 3.1.9 2.5.303, 3.1.9
  2. Hoch · 7.5 CVE-2026-48506 < 2.5.301, >= 3.0, < 3.1.7 2.5.301, 3.1.7
  3. Hoch · 8.2 CVE-2026-48109 < 2.5.301, >= 3.0.214-rc.1, < 3.1.7 2.5.301, 3.1.7

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.