CVE-2026-106453: yawkat LZ4 Java: LZ4DecompressorWithLength allocates the unvalidated size from the 4-byte length header, so a 5-byte input triggers a 1 GiB allocation and OutOfMemoryError

Published Oct 6, 2026
·
Updated

Summary

LZ4DecompressorWithLength.decompress(byte[], int) allocates whatever size the 4-byte length header declares, before it reads a single byte of compressed data. A 5-byte input whose header says 0x40000000 makes the JVM commit a gigabyte and can cause heap exhaustion.

Details

net.jpountz.lz4.LZ4DecompressorWithLength reads the header and passes it straight on:

java final int destLen = getDecompressedLength(src, srcOff); return fastDecompressor.decompress(src, srcOff + 4, destLen);

and net.jpountz.lz4.LZ4FastDecompressor allocates it:

java public final byte[] decompress(byte[] src, int srcOff, int destLen) { final byte[] decompressed = new byte[destLen]; decompress(src, srcOff, decompressed, 0, destLen); return decompressed; }

getDecompressedLength performs no validation: no comparison against src.length, no ceiling, no rejection of negatives. LZ4SafeDecompressor.decompress(byte[], int, int, int) has the same shape with maxDestLen.

The sibling overload that callers pass their own buffer to, decompress(src, srcOff, dest, destOff, destLen), is fine, because there destLen is chosen by the caller rather than by the input. The bug is specific to the convenience overloads that take the size from the header, and that difference is the whole finding.

Impact

Any application that decompresses attacker-supplied LZ4 frames through the with-length convenience API can be made to allocate up to 2 GiB per call from a 5-byte message. On a service that decompresses request bodies, a few concurrent 5-byte requests exhaust the heap. No privileges are needed, only the ability to get bytes into the decompressor. Confidentiality and integrity are untouched.

Other sources

yawkat LZ4 Java provides LZ4 compression for Java. Prior to 1.11.2, LZ4DecompressorWithLength uses getDecompressedLength to trust the four-byte decompressed-length header before validating the compressed input, allowing a five-byte attacker-supplied input whose header declares a large output size to request up to approximately 2 GiB and exhaust the JVM heap. Convenience overloads backed by LZ4FastDecompressor or LZ4SafeDecompressor allocate the untrusted size, while overloads that write to a caller-provided destination buffer are not affected because the caller controls the destination size. This issue is fixed in version 1.11.2.

— MITRE

Affected Software

3 affected componentsFixes available
maven/org.lz4/lz4-java<1.11.2
maven/org.lz4:lz4-java<=1.8.1
maven/at.yawk.lz4:lz4-java<=1.11.1
1.11.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/at.yawk.lz4:lz4-java to a version that resolves this vulnerability.

    Fixed in 1.11.2
  2. Upgrade

    Upgrade yawkat LZ4 Java to a version that resolves this vulnerability.

    Fixed in 1.11.2

Event History

Oct 6, 2026
CVE Published
via MITRE·07:54 PM
Data Sourced
via MITRE·07:54 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness
Oct 7, 2026
Advisory Published
via GitHub·04:17 PM
Data Sourced
via GitHub·04:17 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using lz4-java versions prior to 1.11.2 are exposed if they decompress attacker-supplied data through convenience overloads backed by LZ4FastDecompressor or LZ4SafeDecompressor. These overloads allocate a destination buffer based on the untrusted length header.

2

What does an attacker need to send to trigger the resource exhaustion?

An attacker needs to supply compressed input to an affected decompression path. A five-byte input with a crafted four-byte decompressed-length header can request a very large allocation, up to approximately 2 GiB, and exhaust the JVM heap.

3

Are all LZ4DecompressorWithLength overloads affected?

No. Overloads that write into a caller-provided destination buffer are not affected, because the caller controls the destination size rather than allocating from the untrusted header.

4

What can be done if upgrading is not immediately possible?

Avoid the convenience decompression overloads that allocate the output buffer from the encoded length. Use an overload that writes to a caller-provided destination buffer with a controlled size.

5

How can I determine whether remediation is needed?

Check whether the application uses lz4-java before version 1.11.2 and whether untrusted compressed input reaches convenience overloads backed by LZ4FastDecompressor or LZ4SafeDecompressor. Upgrading to version 1.11.2 addresses the issue.

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