All vulnerabilities
CVE-2026-106450GHSA-gm45-99xc-r7wv

at.yawk.lz4:lz4-java: yawkat LZ4 Java: LZ4FrameInputStream reallocates block buffers for every frame, allowing CPU and GC amplification from small inputs

yawkat at.yawk.lz4:lz4-javamavenLibraries & packages
CVSS
5.3Medium
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.37%Chance of exploitation activity in the next 30 days, higher than 29% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.11.4Fixed versionGitHub
Published6 Oct 2026Updated 9 Oct 2026CVE List

What fixes it

  • 1.11.4at.yawk.lz4:lz4-java, mavenGitHub<dependency><groupId>at.yawk.lz4</groupId><artifactId>lz4-java</artifactId><version>1.11.4</version></dependency>
  • 1.11.4at.yawk.lz4:lz4-java, MavenOSV<dependency><groupId>at.yawk.lz4</groupId><artifactId>lz4-java</artifactId><version>1.11.4</version></dependency>

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Summary

LZ4FrameInputStream allocates two new buffers of the frame's maximum block size, up to 4 MiB each, every time it reads a frame header. Because concatenated frames are read by default, an input made of many minimal empty frames forces about 8 MiB of zeroed heap allocation for every 11 input bytes.

Details

In net.jpountz.lz4.LZ4FrameInputStream.readHeader():

maxBlockSize = frameInfo.getBD().getBlockMaximumSize();
compressedBuffer = new byte[maxBlockSize]; // Reused during different compressions
rawBuffer = new byte[maxBlockSize];
buffer = ByteBuffer.wrap(rawBuffer);

This runs for every frame, and the previous frame's arrays are never reused. A valid 11-byte frame consists of the magic number, FLG 0x60, BD 0x70 (4 MiB blocks), the header checksum, and an immediate end mark. It carries no data, yet triggers the full 8 MiB allocation. new LZ4FrameInputStream(in) reads concatenated frames by default.

In local measurements on JDK 25, 10,000 such frames (110 KB of input) took about 8 seconds of CPU to read, roughly 70 seconds per MiB of input. This was similar under G1, Parallel, Serial and ZGC. A legitimate stream costs orders of magnitude less per input byte.

Impact

Applications that decode attacker-controlled LZ4 frame data with LZ4FrameInputStream can be made to spend large amounts of CPU and GC time relative to the input size. Live heap stays bounded at about 8 MiB and the stream produces no output, so decompressed-size limits do not help. Cost grows linearly with input size, so the practical limit is the compressed input size the application accepts. Availability impact only.

Applications using readSingleFrame = true perform only one allocation and are not affected.

Patch

Fixed in lz4-java 1.11.4. LZ4FrameInputStream now allocates its block buffers only when a block needs them and reuses them across frames, never shrinking them. The content checksum hash and the skippable-frame skip buffer are also reused instead of being created for every frame. Decompression is limited to the current frame's maximum block size.

For older versions, the workaround is to limit the compressed input size accepted from untrusted sources, or use single-frame mode where that is sufficient.

Text from GitHub Advisory Database

Affected versions 26

  • at.yawk.lz4:lz4-java, maven<= 1.11.3GitHub
  • org.lz4:lz4-java, maven<= 1.8.1GitHub
  • lz4-javaaffected: < 1.11.4CVE List
  • at.yawk.lz4:lz4-java, Mavenfrom first release, fixed in 1.11.4OSV
  • at.yawk.lz4:lz4-java, Maven1.10.0OSV
  • at.yawk.lz4:lz4-java, Maven1.10.1OSV
  • at.yawk.lz4:lz4-java, Maven1.10.2OSV
  • at.yawk.lz4:lz4-java, Maven1.10.3OSV
  • at.yawk.lz4:lz4-java, Maven1.10.4OSV
  • at.yawk.lz4:lz4-java, Maven1.11.0OSV
  • at.yawk.lz4:lz4-java, Maven1.11.1OSV
  • at.yawk.lz4:lz4-java, Maven1.11.2OSV
  • at.yawk.lz4:lz4-java, Maven1.11.3OSV
  • at.yawk.lz4:lz4-java, Maven1.8.1OSV
  • at.yawk.lz4:lz4-java, Maven1.9.0OSV
  • org.lz4:lz4-java, Mavenfrom first release, through 1.8.1OSV
  • org.lz4:lz4-java, Maven1.4OSV
  • org.lz4:lz4-java, Maven1.4.0OSV
  • org.lz4:lz4-java, Maven1.4.1OSV
  • org.lz4:lz4-java, Maven1.5.0OSV
  • org.lz4:lz4-java, Maven1.5.1OSV
  • org.lz4:lz4-java, Maven1.6.0OSV
  • org.lz4:lz4-java, Maven1.7.0OSV
  • org.lz4:lz4-java, Maven1.7.1OSV
  • org.lz4:lz4-java, Maven1.8.0OSV
  • org.lz4:lz4-java, Maven1.8.1OSV

References 5