MessagePack's LZ4 decompression may fail with AccessViolationException after dereferencing memory from bad input
High severity
GitHub Reviewed
Published
Jun 9, 2026
in
MessagePack-CSharp/MessagePack-CSharp
•
Updated Jun 25, 2026
Package
Affected versions
< 2.5.301
>= 3.0.214-rc.1, < 3.1.7
Patched versions
2.5.301
3.1.7
Description
Published to the GitHub Advisory Database
Jun 11, 2026
Reviewed
Jun 11, 2026
Published by the National Vulnerability Database
Jun 22, 2026
Last updated
Jun 25, 2026
Impact
A vulnerability exists in the optional LZ4 decompression path used by MessagePack compression modes
Lz4BlockandLz4BlockArray.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
AccessViolationExceptionduring 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:
Lz4Block,Lz4BlockArray).Resources
References