GHSA-v72x-2h86-7f8m
HIGHGHSA-v72x-2h86-7f8m is a high-severity (CVSS 7.5) CWE-409 vulnerability in MessagePack. O3 Security confirms whether GHSA-v72x-2h86-7f8m is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
MessagePack-CSharp: LZ4 decompression allocates from unbounded declared output lengths
Real-World Exposure
MessagePack.NETMessagePackReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.
Description
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:
MessagePackSerializerwithWithCompression(MessagePackCompression.Lz4Block)orWithCompression(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:
- Upgrade
MessagePackto the patched version for your release line. - 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 lengthMESSAGEPACKCSHARP-011: duplicate decompression-bomb finding- CWE-409: Improper Handling of Highly Compressed Data
- CWE-770: Allocation of Resources Without Limits or Throttling
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| .NETNuGet | MessagePack | all versions | 2.5.301 |
| .NETNuGet | MessagePack | ≥ 3.0&&< 3.1.7 | 3.1.7 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for MessagePack. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update MessagePack to 2.5.301 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-v72x-2h86-7f8m is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-v72x-2h86-7f8m is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-v72x-2h86-7f8m. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-v72x-2h86-7f8m in your dependencies?
O3 detects GHSA-v72x-2h86-7f8m across NuGet dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.