Loading...
Skip to main content

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

MEDIUM

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

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

Summary

## Summary When MessagePack-CSharp decompresses `Lz4Block` or `Lz4BlockArray` payloads, it reads declared uncompressed lengths from the wire and allocates output buffers based on those lengths before validating that the compressed data is valid or that the declared expansion is reasonable. A small payload can claim a very large uncompressed length and force a large allocation before LZ4 decoding begins. ## Impact Applications are affected when they deserialize attacker-controlled MessagePack payloads with `MessagePackCompression.Lz4Block` or `MessagePackCompression.Lz4BlockArray` enabled. In the `Lz4Block` case, an attacker-controlled integer is used to request the destination span. In the `Lz4BlockArray` case, per-block uncompressed lengths and their aggregate can be attacker-controlled. Without a cap, the declared output size can be disproportionate to the input size, producing out-of-memory exceptions, process termination on constrained hosts, or severe memory pressure. This advisory is about unbounded allocation from declared decompressed sizes. It is separate from the LZ4 source-buffer over-read issue, which concerns unsafe decoder reads beyond the compressed input buffer. ## Affected components - Package: `MessagePack` - Feature: LZ4 compressed MessagePack payloads - APIs: `MessagePackSerializer` with `WithCompression(MessagePackCompression.Lz4Block)` or `WithCompression(MessagePackCompression.Lz4BlockArray)` - Internal routine: `MessagePackSerializer.TryDecompress` - Finding ID: `MESSAGEPACKCSHARP-OPEN-004` ## Patches Fixes are prepared and will be released in coordinated patch versions. Upgrade guidance: 1. Upgrade `MessagePack` 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 reject negative and excessive uncompressed lengths before allocation. It should also cap aggregate decompressed size for block arrays and expose or honor an appropriate maximum decompressed length policy. ## Workarounds Patching is recommended. Until a patched version is available, do not enable MessagePack-CSharp's built-in LZ4 compression modes for untrusted inputs. If compression is required, enforce strict compressed and decompressed size limits outside MessagePack-CSharp before deserialization. ## Resources - `MESSAGEPACKCSHARP-OPEN-004`: LZ4 decompression allocation from unbounded uncompressed length - `MESSAGEPACKCSHARP-011`: duplicate decompression-bomb finding - CWE-409: Improper Handling of Highly Compressed Data - CWE-770: Allocation of Resources Without Limits or Throttling

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) 7.5 score means for each attack dimension.

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Frequently Asked Questions

What is CVE-2026-48510?
MessagePack-CSharp: LZ4 decompression allocates from unbounded declared output lengths This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2026-48510?
CVE-2026-48510 affects MessagePack. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48510 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-v72x-2h86-7f8m

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-48509
    MEDIUM

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

  • 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

Check if you're affected

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

Scan Your Dependencies