CVE-2026-106452: yawkat LZ4 Java: LZ4BlockInputStream allocates an unvalidated compressed length from the stream header
yawkat LZ4 Java provides LZ4 compression for Java. Prior to 1.11.2, net.jpountz.lz4.LZ4BlockInputStream refill() validates that the compressedLen field in a legacy LZ4Block header is nonnegative but allocates a compressed-input buffer of that attacker-controlled size before reading payload data, allowing a header-only stream to request a near-2 GiB allocation and exhaust the JVM heap. Canonical writers emit raw blocks when compression is not smaller than the original block, but vulnerable readers accept non-canonical oversized compressed blocks. This issue is fixed in version 1.11.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
yawkat LZ4 Javato a version that resolves this vulnerability.Fixed in 1.11.2
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using yawkat LZ4 Java before version 1.11.2 are exposed when they pass attacker-controlled or otherwise untrusted LZ4 legacy block streams to net.jpountz.lz4.LZ4BlockInputStream.
What does an attacker need to do to trigger the problem?
An attacker only needs to provide a crafted stream header with a very large nonnegative compressedLen value. The stream can be header-only; no payload data is required before the vulnerable reader attempts the allocation.
Is this limited to streams produced by standard LZ4 writers?
No. Canonical writers emit raw blocks when compression would not reduce the block size, but vulnerable readers accept non-canonical oversized compressed blocks. Exploitation relies on such an oversized crafted block rather than normal canonical output.
What is the impact of successful exploitation?
The vulnerable reader can attempt to allocate a compressed-input buffer approaching 2 GiB, which can exhaust the JVM heap and cause a denial of service. The provided severity vector indicates no confidentiality or integrity impact.
What should be done to remediate the issue?
Upgrade yawkat LZ4 Java to version 1.11.2, which fixes the issue. Until upgrading, avoid processing untrusted LZ4 legacy block streams with the affected reader.