Skip to main content

MessagePack-CSharp CVE-2026-48109

HIGH
Improper Input Validation (CWE-20)
2026-06-11 https://github.com/MessagePack-CSharp/MessagePack-CSharp GHSA-hv8m-jj95-wg3x
8.2
CVSS 3.1 · Vendor: https://github.com/MessagePack-CSharp/MessagePack-CSharp
Share

Severity by source

Vendor (https://github.com/MessagePack-CSharp/MessagePack-CSharp) PRIMARY
8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
vuln.today AI
6.5 MEDIUM

Network-reachable and unauthenticated, but AC:H because the target must have opted into LZ4 compression on an untrusted-input path; low confidentiality from possible over-read, no integrity impact, high availability from process crash.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/MessagePack-CSharp/MessagePack-CSharp).

CVSS VectorVendor: https://github.com/MessagePack-CSharp/MessagePack-CSharp

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 11, 2026 - 21:21 vuln.today
Analysis Generated
Jun 11, 2026 - 21:21 vuln.today

DescriptionCVE.org

Impact

A vulnerability exists in the optional LZ4 decompression path used by MessagePack compression modes Lz4Block and Lz4BlockArray.

The decoder implementation is based on a deprecated fast-decompression algorithm that does not take a source-length bound. A remote attacker can send a crafted MessagePack payload with manipulated LZ4 token/length fields to force out-of-bounds reads from the compressed input buffer. In affected environments, this can trigger an AccessViolationException during decompression, causing process termination (denial of service). Under some conditions, limited unintended memory disclosure from over-read data may also be possible before failure.

This issue affects applications that deserialize untrusted data while LZ4 compression is enabled.

Patches

The v2 versions are patched as of 2.5.301. The v3 versions are patched as of 3.1.7.

Workarounds

Instead of upgrading, an application may take the following precautions:

  1. Disable LZ4 compression for untrusted input paths (Lz4Block, Lz4BlockArray).
  2. Only accept compressed payloads from strongly trusted producers.
  3. Isolate deserialization in a separate process/container with restart supervision to limit availability impact.

Resources

  • MESSAGEPACKCSHARP-010

AnalysisAI

Denial-of-service in MessagePack-CSharp's optional LZ4 decompression path (Lz4Block and Lz4BlockArray modes) allows remote unauthenticated attackers to crash .NET applications that deserialize untrusted MessagePack payloads. A crafted payload with manipulated LZ4 token/length fields triggers an out-of-bounds read raising an AccessViolationException, and may also leak limited adjacent memory before the process dies. No public exploit identified at time of analysis, but the vendor has published an advisory (GHSA-hv8m-jj95-wg3x) with patched releases 2.5.301 and 3.1.7.

Technical ContextAI

MessagePack-CSharp is a widely deployed binary-serialization library for .NET (distributed via NuGet as the MessagePack package) that supports two optional LZ4 compression modes - Lz4Block (whole-buffer) and Lz4BlockArray (chunked). The vulnerable decoder is derived from a deprecated LZ4 fast-decompression routine that processes the LZ4 token byte and the literal/match length varints without bounding reads against the actual source buffer length. When the attacker-controlled token or extended length field overstates the remaining input, the unsafe pointer walk reads past the end of the compressed buffer. Although no CWE is assigned, the behavior corresponds to CWE-125 (out-of-bounds read) with a secondary CWE-1284 (improper validation of specified quantity in input), manifesting in unmanaged memory as an AccessViolationException in the .NET runtime.

RemediationAI

Vendor-released patch: upgrade MessagePack to 2.5.301 on the v2 branch or 3.1.7 on the v3 branch, per advisory GHSA-hv8m-jj95-wg3x (https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-hv8m-jj95-wg3x). If immediate upgrade is not feasible, disable the Lz4Block and Lz4BlockArray compression modes on any deserialization path that accepts untrusted input - this is the most effective mitigation but breaks interoperability with peers that send LZ4-compressed payloads. Alternatively, restrict acceptance of compressed payloads to strongly authenticated/trusted producers (mTLS or signed-envelope gating), accepting that any compromise of a trusted peer reintroduces the risk. As a defense-in-depth measure, isolate MessagePack deserialization in a separate process or container with supervised restart so an AccessViolationException only kills the sandbox, at the cost of added IPC latency and operational complexity.

Share

CVE-2026-48109 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy