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

Published Jun 22, 2026
·
Updated

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

Other sources

MessagePack for C# is a MessagePack serializer for C#. Prior to 2.5.301 and 3.1.7, 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. This vulnerability is fixed in 2.5.301 and 3.1.7.

MITRE

Affected Software

5 affected componentsFixes available
nuget/MessagePack<2.5.301, <3.1.7
MessagePack Messagepack C\#<2.5.301
MessagePack Messagepack C\#>=3.0.3<3.1.7
nuget/MessagePack>=3.0<3.1.7
3.1.7
nuget/MessagePack<2.5.301
2.5.301

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/MessagePack to a version that resolves this vulnerability.

    Fixed in 3.1.7
  2. Upgrade

    Upgrade nuget/MessagePack to a version that resolves this vulnerability.

    Fixed in 2.5.301
  3. Upgrade

    Upgrade MessagePack to a version that resolves this vulnerability.

    Fixed in 2.5.301
  4. Upgrade

    Upgrade MessagePack to a version that resolves this vulnerability.

    Fixed in 3.1.7
  5. Configuration

    Until patched versions are deployed, do not enable MessagePack-CSharp built-in LZ4 compression modes (MessagePackCompression.Lz4Block or MessagePackCompression.Lz4BlockArray) when deserializing attacker-controlled MessagePack payloads. (Finding ID MESSAGEPACKCSHARP-OPEN-004 / MESSAGEPACKCSHARP-011)

    MessagePackSerializer MessagePackCompression (Lz4Block/Lz4BlockArray) for untrusted inputs = disabled
  6. Compensating control

    If compression is required, enforce strict compressed and decompressed size limits outside MessagePack-CSharp before deserialization (the declared uncompressed length from the wire is attacker-controlled for Lz4BlockArray, and an attacker-controlled integer requests the destination span for Lz4Block).

Event History

Jun 22, 2026
CVE Published
via MITRE·09:16 PM
Data Sourced
via MITRE·09:16 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Jun 25, 2026
Advisory Published
via GitHub·06:53 PM
Data Sourced
via GitHub·06:53 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-48510?

CVE-2026-48510 has a risk rating of 54.

2

How do I fix CVE-2026-48510?

To fix CVE-2026-48510, upgrade to MessagePack-CSharp versions 2.5.301 or 3.1.7 or later.

3

What is the impact of CVE-2026-48510?

CVE-2026-48510 can lead to denial of service due to unbounded memory allocation during decompression.

4

Which versions of MessagePack-CSharp are affected by CVE-2026-48510?

MessagePack-CSharp versions prior to 2.5.301 and 3.1.7 are affected by CVE-2026-48510.

5

What components of MessagePack-CSharp are involved in CVE-2026-48510?

CVE-2026-48510 specifically involves the LZ4 decompression functionality in MessagePack-CSharp.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203