All vulnerabilities
CVE-2026-106449GHSA-343h-94h5-c4wr

at.yawk.lz4:lz4-java: yawkat LZ4 Java: LZ4BlockInputStream with stopOnEmptyBlock=false recurses once per empty block, causing StackOverflowError

yawkat at.yawk.lz4:lz4-javamavenLibraries & packages
CVSS
3.7Low
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.34%Chance of exploitation activity in the next 30 days, higher than 26% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.11.4Fixed versionGitHub
Published6 Oct 2026Updated 7 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

When LZ4BlockInputStream is configured with stopOnEmptyBlock = false (the mode for reading concatenated block streams), it handles each empty block by calling refill() recursively. A long run of empty blocks exhausts the thread stack and throws StackOverflowError out of read() or skip().

Details

In net.jpountz.lz4.LZ4BlockInputStream.refill():

if (originalLen == 0 && compressedLen == 0) {
  if (check != 0) {
    throw new IOException("Stream is corrupted");
  }
  if (!stopOnEmptyBlock) {
    refill();
  } else {
    finished = true;
  }
  return;
}

Each well-formed empty block is 21 bytes and adds one stack frame, with no limit on nesting depth. In local testing, around 10,000 to 100,000 consecutive empty blocks (about 210 KB to 2.1 MB, depending on JIT state and thread stack size) threw StackOverflowError. StackOverflowError is an Error, not an IOException, so callers that only handle I/O errors for corrupt input don't catch it.

Impact

Applications that decode attacker-controlled LZ4Block streams with LZ4BlockInputStream.newBuilder().withStopOnEmptyBlock(false) or the deprecated LZ4BlockInputStream(InputStream, boolean) constructor can have the decoding thread fail with StackOverflowError. The default configuration (stopOnEmptyBlock = true) is not affected. There is no memory corruption. Availability impact only.

Patch

Fixed in lz4-java 1.11.4. Empty blocks are now skipped in a loop instead of by recursion, so any number of consecutive empty blocks uses constant stack space.

For older versions, the workaround is to use the default stopOnEmptyBlock = true for untrusted input, or catch StackOverflowError around the read loop.

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